Page History
...
The implementation makes use of the following instructions:
Workflow
ddThe below workflow implements the use case.
Download: retry-on-return-code.workflow.json
x
...
Explanation:
- This workflow implements
- an outer Retry Block to repeat execution.
- an inner Try / Catch Block to handle specific exit codes of the job.
Try Block
Explanation:
- After a first job job1 the job2 should be restarted for a number of times if it fails with return code 1.
- The JS7 - Retry Instruction manages the retry capability and the intervals.
- JS7 - Try / Catch Instruction
- executes the job within the Try Block.
- Should the job complete successfully then processing will continue after the Catch Block.
- Should the job fail then it will enter the Catch Block.
- executes the job within the Try Block.
Catch Block
If Instruction
Explanation:
- Within the Catch Block the JS7 - If Instruction is used to check the return code value which gives two options:
- If the return code is 1 then left branch of the If Instructions used for any other return code values the right branch is used.
- Subsequently we find two occurrences of a JS7 - Fail Instruction.
Fail Instruction
Left Fail
Explanation:
- The left Fail Instruction fails the order with a return code 1.
- In addition, a message can be added that becomes visible with the JOC Cockpit GUI for the failed order.
- As a consequence the failed order is picked up by the outer Retry Instruction that will repeat execution of
job1
.
Right Fail
Explanation:
- The right Fail Instruction fails the order with a return code 2.
- In addition, a message can be added that becomes visible with the JOC Cockpit GUI for the failed order.
- The checkbox uncatchable is used to indicate that the failed order cannot be picked by the outer Retry Instruction and therefore will remain with the current position in a failed state.
Overview
Content Tools