Page History
...
- A number of jobs are executed in sequence.
- If one or more jobs fail with return code 1 then the jobs should be repeated for a number of times. For any other non-zero return codes the order should be put to a failed state and should wait for user intervention, for example to resume or to cancel the failed order.
- A related scenario is available from JS7 - How to retry a job in case of specific exit codes.
...
Solution
The below workflow implements the use case from the following instructions:
...
- Within the Catch Block the JS7 - If Instruction is used to check the return code value. This value is available from the built-in
$returnCode
variable. - The If Instruction evaluates the return code by use of the
$returnCode == 1
predicate. For details about predicates, see JS7 - Expressions for Variables. - The evaluation result value which gives two options:
- if the return code value is 1 then the left branch (true) of the If Instruction is used,
- for any other return code values the right branch (false) is used.
- Subsequently we find two occurrences of a JS7 - Fail Instruction.
Fail Instruction
Left Fail Instruction
Explanation:
- The left Fail Instruction fails the order with a return code value 1.
- In addition, a message can be is added that becomes visible with the JOC Cockpit GUI for the failed order.
- As a consequence the failed order is immediately picked up by the outer Retry Instruction that will repeat execution of
job1
having applied the indicated delay.
Right Fail Instruction
Explanation:
- The right Fail Instruction fails the order with a return code value 2.
- In addition, a message can be is added that becomes visible with the JOC Cockpit GUI for the failed order.
- The
uncatchable
checkbox is used to indicate that the failed order cannot be picked by the outer Retry Instruction. Instead, the order will remain with its current position in a failed state and waits for user intervention.
...
Overview
Content Tools