An example of using recovery jobs to implement workflow

This section describes how you can implement the scenario described in Examples of job conditional dependencies evaluation by using recovery jobs instead of the NOERROR function.

These are the requirements that the workflow must satisfy:
  • JOB1 ends successfully only when RC=0, RC=4, or RC=8 is returned. Any different result causes the job to end in error.
  • JOB2 must run if JOB1 ends successfully with RC=4.
  • JOB3 must run if JOB1 ends successfully with RC=8.
  • JOB2 and JOB3 are skipped if JOB1 ends successfully with RC=0.
  • JOB53 runs unconditionally when JOB1 completes successfully and the two jobs, JOB2 and JOB3, are either completed or skipped.

Example of conditioning operations using recovery jobs shows how you can customize the workflow to implement its requirements using recovery jobs. In the figure dotted lines represent conditional dependencies.

Figure 1. Example of conditioning operations using recovery jobs

The graphic shows an example of conditioning operations using recovery jobs.

Define the workflow in the following way:

  • Set JOB2 as recovery job for JOB1, specifying that JOB2 must run if JOB1 RC=4.
  • Set JOB3 as recovery job for JOB1, specifying that JOB3 must run if JOB1 RC=8.
  • Define a condition on JOB5 specifying that JOB5 must run if the status of one among JOB1, JOB2, and JOB3 is C.