public LaunchConfiguration(LaunchConfiguration config) { this.processName = config.getProcessName(); this.resourceType = config.getResourceType(); this.resourceId = config.getResourceId(); this.data = config.getData(); this.predicate = config.getPredicate(); this.parentProcessState = config.getParentProcessState(); this.runAfter = config.getRunAfter(); this.accountId = config.getAccountId(); this.priority = config.getPriority(); }
public GenericResourceProcessState(JsonMapper jsonMapper, ResourceStatesDefinition stateDef, LaunchConfiguration config, ObjectManager objectManager) { super(jsonMapper, stateDef); this.objectManager = objectManager; this.resource = objectManager.loadResource(config.getResourceType(), config.getResourceId()); this.processLock = new ResourceChangeLock(config.getResourceType(), config.getResourceId()); this.resourceId = config.getResourceId(); this.data = config.getData(); this.state = lookupState(); }
protected void scheduleChain(final String chainProcess) { final ProcessState state = instanceContext.getState(); final LaunchConfiguration config = new LaunchConfiguration(chainProcess, record.getResourceType(), record.getResourceId(), record.getAccountId(), record.getPriority(), state.getData()); config.setParentProcessState(state); ExecutionExceptionHandler handler = this.context.getExceptionHandler(); Runnable run = new Runnable() { @Override public void run() { DefaultProcessInstanceImpl.this.context.getProcessManager().scheduleProcessInstance(config); log.debug("Chained [{}] to [{}]", record.getProcessName(), chainProcess); state.reload(); } }; if (handler == null) { run.run(); } else { handler.wrapChainSchedule(state, context, run); } }
return new LaunchConfiguration(processName, schema.getId(), id.toString(), ObjectUtils.getAccountId(resource), priority, processData);