This feature allows to configure the next job node in a job chain for a range of exit codes of the current job.
In addition to controlling the workflow by next_state (true) and error_state attributes the exit code of shell processes can be used directly. The return values true and false of API tasks are mapped to the same result as exit code 0 (success) and 1 (error).
- If the exit code of the current task returns 3 then the next state for the order should be the error state. Other exit codes are considered to represent the successful execution of the task.
- If the exit code of the current task returns one of the values 3-9 then the order should be assigned a specific state and should be continued by the respective job node.
- Should the element <to_state> be missing, then JobScheduler will apply the job_chain_node/@next_state or job_chain_node/@error_state attribute.
- For return_code single values can be specified and closed intervals [i, j] separated by spaces, e.g. "1..5 7 12..15".
- Each return code can only be used once..
- The attributes next_state and error_state are applied if no on_return_code element is used.
- Should no <on_return_code> element match the current return code then JobScheduler will apply the job_chain_node/@next_state (return code 0) or job_chain_node/@error_state (other return codes) attribute.