About Sync and Async Sub Flows
  • 24 Aug 2022
  • 3 Minutes to read
  • Dark

About Sync and Async Sub Flows

  • Dark


A Sub Flow is a Flow that runs like a step within the course of another Flow. A Sub Flow may also be referred to as a child Flow and the primary Flow as a parent Flow.

A Sub Flow can be configured in two ways:

  • Synchronously: allows the sub Flow and parent Flow to run sequentially.
  • Asynchronously: allows the primary Flow to run independently while the sub Flow completes.

With an Asynchronous Flow, control is immediately returned to the primary Flow. This results in the two Flows being asynchronous, meaning that the sub Flow is now an independently executing Flow and has no necessary output data to deliver to the primary Flow. 

Synchronous Flows

Synchronous Flows help handle processes that require the main Flow and sub Flow to occur one after the other.

For instance, within the Flow below, the email handling process is split up into multiple synchronous sub Flows depending on how the email is evaluated. After reaching the email Process Folder, an email is evaluated as either an invoice, resume, or other types and sent to its respective sub Flow. This allows for running a sub Flow midway through the process before proceeding to the next step and returning data to the parent Flow. This can be especially helpful if a manager's approval or a user response is required in the process. It also allows each sequence in the Flow to be evaluated and easily troubleshot, as they are split up separately. 

Asynchronous Steps

Start Linked Flow Async Step

The Start Linked Flow Async step is a sub Flow that runs independently from the primary Flow. The primary purpose of Async Flows is for use in instances where the Primary Flow needs to delegate a task to the Sub Flow. Async Flows run as a System user and not the initiating user. 

In the screenshot below, whenever an email is found, it is delegated to the process workflow to be filtered by a user set Rule. In this case, the async method allows the primary Flow to check for emails while the child Flow processes each one individually.

Run Flow Async And Wait Option on Run Flow Step

The Run Flow Async And Wait is a check box configuration on the Run Flow step that does not run the sub Flow independently from the parent process but executes it on a separate thread.  This option is used to spawn a new process, run the Flow on a separate thread, then return the data to the primary Flow. This is helpful in scenarios involving multiple steps involving a loop or branch usually running synchronously, such as API calls or adding numbers. The Run Flow Async and Wait option allow these tasks to be executed in parallel to save time. The Run Flow Async and Wait option is most commonly enabled to assist with API calls that return large amounts of data.

This option differs from the Start Linked Flow Async step in that it returns data, and the Start Linked Flow Async step does not.

Go Async Flow Step

The Go Async step is used to move the current execution of the Flow to a different thread. This allows users more precision when directing which portion of a Flow is run async. Users may run portions of a Flow async without having to move the whole process.

Checking Flow Element Attribute 

To determine if a Flow is Sync or Async after it has been created without opening it, users may utilize the information provided by the Element Attribute in the Flow's PROPERTIES on the Info panel in the Flow Designer. This property provides information on the selected Designer Element, such as its Type and the run behavior. This information is located in the Information Panel that appears upon selecting any space within the Designer Project's Report row for that specific Flow.

For further information on Flows, visit the Decisions Forum.

Was this article helpful?