Defining when a flow is successful or failed when using branches in a flow

About this task

In cases in which you have a flow that has multiple branches and only some branches may run you want to be able to specify to Process Manager to identify a flow as successful when all jobs that are able to run have completed, and identify the flow as failed if any job in the flow fails. You can configure this in the flow's Flow Completion Attributes.

For example, you have a flow with this type of scenario, in which you run one branch when a job succeeds and another branch when the job fails. In this type of case, all jobs in the flow will never run. You want the flow to be considered successful when jobs J1, J2, or J3 complete successfully. When jobs J1, J2, J4 or J5 fail, you want the flow to be considered failed, but you do want jobs J4 and J5 to run to completion.

Procedure

  1. In Flow Editor, select Action > Specify Flow Completion Attributes.
    The Flow Completion Attributes dialog is displayed.
  2. In Determine the state of the flow when...., select All work items complete successfully or any work item fails, and select Ignore work items in the Waiting state that will never run, or that depend on a file, time, or proxy event to place a checkmark in it.

    You select the checkbox to indicate to determine the state of the flow when all work items that have been submitted to run have completed successfully, or any work item that has been submitted to run has failed. If work items are not submitted to run(such as a branch of a flow), they should not be considered in determining the state of the flow.

  3. Under When any work item fails, select Continue running the flow and when the flow is complete, change the flow state.
    In our example, this allows the branch in the flow that runs when J1 fails to continue running until completion.
  4. Click OK.