Scope
- Use Case:
- Consider the situation where:
- A job chain is to start at a number of parallel job chains
- Subsequent jobs in started job chains check if jobs from parallel chains completed successfully.
- Usually a split & sync pattern is used for similar use cases, however, synchronizing includes that both jobs have to be completed.
- Instead the current use case is about check and control if a job of a parallel chain has completed without forcing both jobs to run synchronously.
- Consider the situation where:
Solution
- Download: controlParallelExecutionOfJobChainsExample.zip
- Extract the archive to a folder in your JobScheduler installation named
./config/live. - The archive will extract the files to a sub-folder
controlParallelExecutionOfJobChainsExample. - Note that you can store the sample files in any folder you like.
Pattern

Implementation
Components
- The solution contains six job chains:
JobChain1runsJob1andJob2in parallel.- On successful completion of
Job1thenJobChain2is run - On successful completion of
Job2thenJobChain3is run
- On successful completion of
JobChain2runsJob3andJob4JobChain3runsJob5andJob6JobChain4runs after successful completion ofJobChain1JobChain4runsJob7,Job8,Job9Job7runs 1stJob8runs onceJob7andJob4have run successfully
JobChain5runs after successful completion ofJobChain1JobChain5runsJob10,Job11andJob12Job10runs 1stJob11runs onceJob10,Job4andJob6have run successfullyJob12runs onceJob11has completed successfully
JobChain6runs onceJob9andJob12have completed successfully
Usage
- The first job
split1sets a number of parameters by use of a pre-processing Monitor for later control of successful completion of jobs. For each job to be controlled a pair of parameters is used:- The first parameter of the pair is a flag which is used for later checking if the dependent job is successfully completed.
- The value of this parameter is initialised with "0" and is modified by the dependent jobs to "1".
In the above example the following parameters are used:
job4_successfully_completed=0which will be checked byJob8andJob11job6_successfully_completed=0which will be checked byJob11job12_successfully_completed=0which will be checked byJob13
- The second parameter of the pair describes to which job chains the information about successful completion is broadcasted.
- The example specifies the job chains for which a suspended order is continued if the current job completes successfully.
- The current job chain (here
JobChain1) always is the first in the list. - The job chains can be specified by an absolute path or by a relative path to the current job chain.
In the above example the following values are used:
job4_commits_completion_to="/controlParallelExecutionOfJobChainsExample/JobChain1;JobChain4;JobChain5"
job6_commits_completion_to="/controlParallelExecutionOfJobChainsExample/JobChain1;JobChain5"
job12_commits_completion_to="/controlParallelExecutionOfJobChainsExample/JobChain1;JobChain4;JobChain6"
- The first parameter of the pair is a flag which is used for later checking if the dependent job is successfully completed.
- The dependent jobs (here
Job4,andJob6) use a post-processing monitor that implements commands to resume the ordersJob12- in all job chains which are specified by the
commits_completion_toparameter - where the value of the
successfully_completedparameter is set to "1".
- in all job chains which are specified by the
- The jobs that wait for dependent jobs make use of a pre-processing monitor that checks the corresponding
successfully_completedparameters.- These jobs use a task parameter
dependent_jobsthat specifies a list of dependent jobs. - In above example these are
Job8 : dependent_jobs="Job4"Job11: dependent_jobs="Job4;Job6"Job13: dependent_jobs="Job12"
- These jobs use a task parameter
The above described pre- and post-processing monitors include the attached
control_parallel_execution_of_job_chains.jsJavaScript like this:
See also
- How to check the job chain history for previous job chain and order runs
- How to add a condition to check previous jobs before the execution of the current job chain