Specify dependencies on a subflow

About this task

When you draw a dependency line from a subflow to another work item in the flow definition, provided that the subflow does not have a pre-defined exit condition, the dependency you create is the default: the work item cannot run until all of the jobs in the subflow complete successfully.

You can specify the type of dependency to be one of the following:

  • All jobs in the subflow complete successfully—the default
  • All jobs in the subflow end, regardless of the exit code
  • The sum of the exit codes of all the jobs in the subflow has a value
  • The subflow fails
  • The subflow fails with the specified exit code
  • The subflow completes successfully with the specified exit code
  • A specified number of jobs in the subflow complete successfully
  • A specified number of jobs in the subflow fail
  • A specified number of jobs in the subflow end regardless of success or failure
  • A specified number of jobs in the subflow have started
  • The subflow runs longer than it should
  • The subflow runs for an abnormally short length of time
  • The subflow misses its schedule

Procedure

  1. Draw both the predecessor subflow and the work item that succeeds it.
  2. Change to job dependency mode by clicking the Insert Dependency button.
  3. Draw a dependency line from the subflow to the work item that depends on the subflow.
  4. To change the type of dependency, right-click on the dependency line and select Open Definition. The Event Definition dialog box appears.
  5. In the Event type field, select the type of dependency you want to use to trigger the successor job, and the appropriate operator and values. See the examples that follow for subflow dependencies you can use.
  6. In the Description field, add any descriptive text that may be helpful for understanding this event. For example, if this event requires special instructions for operations staff, place those instructions here.
  7. Click OK.

Examples

Sum of the exit codes has a specific value

Specified number of jobs complete successfully

Specified number of jobs fails

Use this case when you want to run a job if the subflow fails. If you want to trigger the event when a certain number of jobs fail, specify the number of jobs that must complete successfully. This trigger occurs in real time—as soon as the specified number is met, the event triggers. It does not wait until the flow completes to test the condition.

Specified number of jobs have started