Flow control actions

Completed 100 XP

By default, a flow moves from one action to the next in the numerical order that these actions appear in the workspace. However, flow control actions can interrupt and redirect the normal order, according to your requirements.

Certain actions, such as the Go to action or the Exit subflow action, interrupt the default running order of the flow and direct it to another point in the same subflow or another subflow.

The Label action creates a point of reference for the Go to action to direct the flow to.

The Run subflow action interrupts the subflow in which it is placed and runs another subflow. When the second subflow completes, the flow reverts to the original subflow to continue running. These subflows are often used in conjunction with conditionals.

Flow control actions

To enter a comment for reference purposes, use the Comment action. Comments facilitate flow design and allow users to make notes and explain the logic of action implementation and flow design. They appear in the flow workspace as lines of text. You input text in the Comment field of the comment action.

Screenshot of the Comment action properties dialog.

You can direct your flow to a specific destination point in the flow marked with the Label action. Provide a name for the label in the Label name field.

Screenshot of the Label action properties dialog.

Once you've inserted a Label action, you can use a Go to action and select a previously entered label, from a drop-down list input, to direct the flow to that label.

go to action properties

To run another subflow at any point in the flow, use the Run subflow action. When the subflow completes, the flow continues with the next action. Once you've created subflows, you can then choose a specific subflow to run from the Run subflow dropdown list.

Screenshot of the Run subflow action properties dialog.

To stop the subflow and go back to the point where it was run from, use Exit subflow. This action does not have properties. The Exit Subflow action is not required at the end of a subflow. When all the actions in a subflow have run, the flow will continue from the point where the subflow was run.

To stop running the entire flow, use the Stop flow action. To stop the flow with an error message, set End flow to With error message and specify the message to display.

stop flow action properties

Place actions that are likely to fail or produce an erroneous result in an error block. The On block error action along with its corresponding End action are used to create an error block. Place actions in an error block to prevent the entire block from attempting to complete in the event that at least one of the actions within it fails.

Configure the properties to perform any combination of the described operations upon encountering an error inside the block in the following table:

Operation Description
Set variable Specify a variable and the value to set or set a value to a new variable.
Run subflow Specify which subflow to run from the list of subflows.
Go to next action Continue running the flow from the action that immediately follows the action that produced an error in the exception block.
Repeat action Retry the action that produced an error.
Go to label Continue running the flow from a specified label.
Go to beginning of block Direct the flow to retry the actions inside the exception block from the start.
Go to end of block Direct the flow to the end of the block.

Screenshot of the On block error action properties dialog.

The Get last error is a useful way to assist with troubleshooting your flow. This action stores the last error in a variable called LastError of type error which details the error that occurred last in the flow. There is a Clear error parameter toggle for this action (defaults as false) that will clear the variable so that the next time the flow retrieves the error, it won't retrieve the same error value.

Use the Region action and corresponding End Region action to mark the beginning and end of a group of actions in your flow. You can input a region Name via a text input field. Once you add a region to your flow, the editor automatically adds an end region. Then you can either add additional steps between them or drag and drop existing steps between them.

The Wait action allows you to suspend your flow's execution for a duration of seconds. You input the number of seconds to wait in the Duration field of the wait action.

Now you should have a basic understanding of the Flow control actions available to you when creating a desktop flow. Let's continue with a knowledge check.


Next unit: Check your knowledge

Previous Next