Skip to end of metadata
Go to start of metadata

Note

Icon

Control of process flow has been improved by a generic feature FEATURE AVAILABILITY STARTING FROM RELEASE 1.9

JS-1190 - Control the workflow of a job chain by exit codes Released

 

  • The normal behaviour is that JobScheduler handles exit codes <> 0 as an error.
  • Depending on the error handling, the order moves to the error state, will be suspended or will enter a setback interval. 
    • You can modify this behaviour by implementing some post-processing:
      • For the following example job chain the post-processing is configured as a CDATA element for better readability. 
      • You could also provide a file with a post-processing script to organise some general use of error handling by including the file to multiple job chains.
  • There are two possible approaches:
    • the first handles each exit code individually and 
    • the second is more generic. 
  • You switch between the examples by changing the exit code of the first step. If the exit code is 0, then the more generic example will be executed. 
  • To make this example work for your environment you can download the configuration files and add them to a folder in the ./config/live directory.

First Example

Job: job_with_exit_code

Job: job_with_exit_code  Expand source

Second Example

Job: job_with_exit_code_generic

Job: job_with_exit_code_generic  Expand source

Job and Job Chain for both Examples

Job: job_sample

Job: job_sample  Expand source

Job Chain: job_chain_exit_code_dispatcher

Job Chain: job_chain_exit_code_dispatcher  Expand source

Related Downloads