You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

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.

Solution

  • Download: final_chain_job_chain_history.zip
  • Extract the archive to a folder in your JobScheduler installation named ./config/live.
  • The archive will extract the files to a sub-folder parallel_job_chain_control. 
  • Note that you can store the sample files in any folder you like.

Pattern

Implementation

Components

  • The solution contains six job chains:
    • JobChain1 runs Job1 and Job2 in parallel.
      • On successful completion of Job1 then JobChain2 is run
      • On successful completion of Job2 then JobChain3 is run
    • JobChain2 runs Job3 and Job4
    • JobChain3 runs Job5 and Job6
    • JobChain4 runs after successful completion of JobChain1
      • JobChain4 runs Job7, Job8, Job9
      • Job7 runs 1st
      • Job8 runs once Job7 and Job4 have run successfully
    • JobChain5 runs after successful completion of JobChain1
      • JobChain5 runs Job10, Job11 and Job12
      • Job10 runs 1st
      • Job11 runs once Job10, Job4 and Job6 have run successfully
      • Job12 runs once Job11 has completed successfully

Usage

  • Positive Check
    • Add an order to job_chain_A using JOC's Add Order context menu.
      • The order should pass through the job chain without errors.
    • Add an order to job_chain_B using JOC's Add Order context menu.
      • The order should also pass through the job chain without errors.
    • Add an order to job_chain_Z using JOC's Add Order context menu.
      • The order should pass through the job chain without errors as all pre-conditions are met.
  • Negative Check
    • Modify the job do_something_job_chain_A to include an error, e.g. by adding the command exit 1 as the final line in the job script.
    • Add an order to job_chain_A:
      • The order should proceed with an error.
    • Add an order to job_chain_Z
      • The order should proceed with an error that is visible in the order log. This error will state that the predecessor job did not complete successfully.
      • The order will be set back and will be repeated according to the setback intervals that have been specified for the job check_predecessor_job_chain_Z.
    • Removing the modification to job do_something_job_chain_A and adding an order to job_chain_A that then runs successfully should result in a successful run of job_chain_Z - either by a new order added to job_chain_Z or by the next execution of the previous order that has been set back.

See also

 

 

  • No labels