Draw dependencies between jobs

To draw a dependency between jobs, use the Insert Dependency icon in the Flow Editor.

About this task

When you draw a line between two work items in the flow diagram, you are establishing dependencies between the two jobs. The default type of dependency is assigned, which is a dependency on the first job to complete successfully. However, you might want a job to run only after a predecessor job fails, or when a job completes with a particular exit code. In these cases, you need to edit the job dependency.

You can display or hide dependency conditions by selecting View > Show Dependency Conditions, or accessing the menu from the pop-up menu by right-clicking in the flow canvas.

You can choose from the following criteria:

  • Run a job when the predecessor completes successfully.
  • Run a job when the predecessor job starts.
  • Run a job when the predecessor is submitted.
  • Run a job when the predecessor job fails.
  • Run a job when the predecessor job ends, regardless of success or failure.
  • Run a job when the predecessor job overruns.
  • Run a job when the predecessor underruns.
  • Run a job if the predecessor fails to start.
  • Run a job when the predecessor cannot run.
  • Run a job if the predecessor misses its scheduled start time.

Procedure

  1. In the Flow Editor, draw dependency lines by selecting the Insert Dependency icon, then clicking the two work items in order.
  2. Right-click the dependency arrow that you just drew and select Open Definition.

    The Job Event dialog is displayed.

  3. Click OK to save your changes.

Examples

Run a job when the predecessor starts.

  • Job name: J1
  • Event type: Starts

Run when predecessor has exit code greater than 2.

  • Job name: J1
  • Event type: Ends with exit code... > Greater than > 2
Run when the predecessor’s exit code is 10, 15, or 22.
  • Job name: J1
  • Event type: Ends with exit code... > Equal to > 10 15 22

You can specify multiple exit codes to indicate to run when any of these exit codes are encountered. You specify a space-separated list of exit codes in numbers in the range 0 - 255.

Run when the predecessor’s exit code is not 9 or 12.
  • Job name: J1
  • Event type: Ends with exit code... > Not equal to > 9 12

You can specify multiple exit codes to indicate to run when any of these exit codes are not encountered. You specify a space-separated list of exit codes in numbers in the range 0 - 255.