Stop Flow

Use the Stop Flow step to halt a flow. The Stop Flow step gives the flow author the ability to define the status of the flow and provide an output message about the status.

Once your flow encounters a Stop Flow step, the flow will stop processing. You may want a flow to stop for a variety of reasons:

Stop steps function differently in parent versus child flows. You can use the Stop Flow step to stop child flow runs while the parent flow continues. A Stop step in a child flow will not stop the parent flow. For parent flows (also called initiating flows), you can view additional details on the Runs tab.

Note: A Stop Flow step inside a For Each in a List step will not stop processing on the remaining items in the collection. This is because all items in the For Each step are processed in parallel. 

Step Inputs

In the Edit Step menu, you can add details about the step configuration as needed for your flow.

Step Detail

At a minimum, you should define the Result Status and Result Message for this step.

Result Status

Choose the status that the flow will display when it processes this step and stops:

Result Message

Define your own message explaining why the flow stopped with this status. You can enter an expression or a string in this field. 

Result Details

This section is optional. Information you add to these fields will be included with the flow result. This information is primarily useful for Stop steps in parent flows, as flow authors can view these details in the Outcomes tab of the Run Details page. If you enter result details for Stop steps in child flows, you won’t be able to view the details with the flow result. However, details in these fields are in general useful for conveying information to the parent flow.

Select the Plus sign to add details about the result. The fields in this section display only after you select the Plus sign. To delete result details, select the trash can icon on the right.

Array Map

This option is off by default. If you want to create a nested object, toggle this option on. 

Property Name

Enter a name for this information.

Value

Enter details about the property. For example, you could enter additional messaging, or you could pull data such as a Project ID to be able to track which projects are associated with a failed result. Enter an expression, string, integer, true/false, list, or null value input.


Step Status

The following statuses may result after running the Stop Flow step.

SUCCESSFUL

Occurs when the Stop Flow step completes and shows a result status of either Success or Failure in the output. 

ERROR

Occurs when:

Step Outputs

Stop Flow steps have an output indicating the result status of the step and the message (both defined in the Step Detail section). Information defined in the Results Detail section is also part of the step output. View step output in the Runs tab of the flow.

Use Cases & Examples

Use a Stop Flow step in the following scenarios.

At the end of a flow

Always include a Stop Flow step at the end of a flow.

At each exit point of a flow

As a best practice, you should also add a Stop Flow step at each exit point from a flow. This is useful because the Stop Flow step can help you determine whether or not a flow completed successfully. 

For example, if you want to send budget data from ProjectSight to Vista, you might first look up the Vista job. Then add a Conditional step, saying if there is no Vista job found, then close out the export budget data request with a failed status. Then stop the flow.

When setting up the nested Stop Flow step, you could define the Result Status of Failure and input your own Result Message to explain the failure: 

To stop a child flow

You can also use a Stop step in a child flow, allowing you to stop the child flow without stopping the entire parent flow. A Stop Flow step only halts processing for its container flow. 

For example, if you had a For Each in a List or Call a Flow step in your flow, these would kick off child flows. You could add a Stop Flow step to help define why the child flow stopped.