public static JSLJob buildFlowInSplitSubJob(long topLevelJobInstanceId, JobContext jobContext, Split split, Flow flow) { ObjectFactory jslFactory = new ObjectFactory(); JSLJob subJob = jslFactory.createJSLJob(); // Uses the true top-level job instance id, not an internal "subjob" id. String subJobId = generateSubJobId(topLevelJobInstanceId, split.getId(), flow.getId()); subJob.setId(subJobId); //Copy all properties from parent JobContext to flow threads subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobContext.getProperties())); //We don't need to do a deep copy here since each flow is already independent of all others, unlike in a partition //where one step instance can be executed with different properties on multiple threads. subJob.getExecutionElements().add(flow); return subJob; }
public static JSLJob buildFlowInSplitSubJob(Long parentJobExecutionId, JobContext jobContext, Split split, Flow flow) { ObjectFactory jslFactory = new ObjectFactory(); JSLJob subJob = jslFactory.createJSLJob(); // Set the generated subjob id String subJobId = generateSubJobId(parentJobExecutionId, split.getId(), flow.getId()); subJob.setId(subJobId); //Copy all properties from parent JobContext to flow threads subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobContext.getProperties())); //We don't need to do a deep copy here since each flow is already independent of all others, unlike in a partition //where one step instance can be executed with different properties on multiple threads. subJob.getExecutionElements().add(flow); return subJob; }
jslJob.setId(jobName); jslJob.setVersion("1.0"); jslJob.setProperties(JobDefinitionBuildUtils.buildJobProperties(scopeId, jobId, jobStartOptions)); jslJob.setListeners(JobDefinitionBuildUtils.buildListener()); jslJob.getExecutionElements().addAll(jslExecutionElements);
public static JSLJob buildFlowInSplitSubJob(JobContextImpl jobContext, Split split, Flow flow) { ObjectFactory jslFactory = new ObjectFactory(); JSLJob subJob = jslFactory.createJSLJob(); // Uses the true top-level job instance id, not an internal "subjob" id. String subJobId = generateSubJobId(jobContext.getInstanceId(), split.getId(), flow.getId()); subJob.setId(subJobId); //Copy all properties from parent JobContext to flow threads subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobContext.getProperties())); //We don't need to do a deep copy here since each flow is already independent of all others, unlike in a partition //where one step instance can be executed with different properties on multiple threads. subJob.getExecutionElements().add(flow); jobContext.addTopLevelContextProperties(subJob.getProperties()); return subJob; }
jslJob.setId(jobName); jslJob.setVersion("1.0"); jslJob.setProperties(JobDefinitionBuildUtils.buildJobProperties(scopeId, jobId, jobStartOptions)); jslJob.setListeners(JobDefinitionBuildUtils.buildListener()); jslJob.getExecutionElements().addAll(jslExecutionElements);
subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobContext.getProperties()));
subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobProperties));
subJob.setProperties(CloneUtility.javaPropsTojslProperties(jobContext.getProperties()));