Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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 workflow presended presented below implements the use case using the following instructions:

Download (.json upload)retry-on-return-code.workflow.json

...

  • After a first job job1, 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.
    • The properties of the Retry Instruction include specifying a common delay for any retries or using individual delays for each retry.
  • The JS7 - Try / -Catch Instruction 
    • executes any number of instructions and jobs within the Try Block.
      • if the jobs complete successfully then processing will continue after the Catch Block.
      • if jobs fail then the instructions and jobs inside the Catch Block will be executed.

...