Versions Compared

Key

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

...

Download: retry-on-return-code.workflow.json

Retry Block

A Retry Block includes any number of jobs or instructions. If one of them fails then processing will be repeated from the beginning of the block.


Explanation:

  • This workflow implements
    • an outer Retry Block to repeat execution,
    • an inner Try / Catch Block to handle specific exit codes of the job,
    • an If Instruction to decide about the handling of specific return codes.

Try Block

A The Try Block includes  inside a Try / Catch Instruction includes any number of jobs or instructions. If one of them fails then processing will be repeated from the beginning of the blockcontinued with the Catch 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.
    • The properties of the Retry Instruction include to specify a common delay for any retries or to use individual delays per retry.
  • The JS7 - Try / Catch Instruction 
    • executes any number of instructions and jobs within the Try Block.
      • Should the jobs complete successfully then processing will continue after the Catch Block.
      • Should jobs fail then the instructions and jobs of inside the Catch Block will be executed.

...

The Catch Block is executed in case of failed instructions or jobs inside in a Try Block.

The solution makes use of an JS7 - If Instruction to apply different types of error handling depending on the return code reported by the failed job.

...