Do the following in parallel flow logic
Summarize
Summary of Do the following in parallel flow logic
TheDo the following in parallelflow logic allows you to run actions and subflows concurrently within separate paths inside an isolated flow logic block. This design enables multiple tasks to execute simultaneously until all parallel paths complete, improving process efficiency when independent actions can proceed without waiting on each other.
Show less
While these paths run in parallel flows logically, they do not execute in multiple threads because the overall flow context is single-threaded. If true multi-threading or separate flow contexts are needed, consider using Dynamic flows instead, though this approach consumes more system resources.
Key Features
- Multiple paths creation: Use the plus (+) icon to add parallel paths, each containing its own actions or subflows that run concurrently within the block.
- No direct inputs or outputs: The block itself has no inputs or outputs, but individual actions or subflows within each path can use inputs and produce outputs.
- Output accessibility: Outputs generated by actions/subflows are accessible only within the same path during execution; after all paths complete, outputs become available to the rest of the flow.
Practical Example
For example, when a change request is created, this flow logic can simultaneously create two separate tasks assigned to different groups. Each task uses data from the triggering change request, such as the Number field, to populate task details independently in parallel paths.
Execution Details
During runtime, the flow header displays the state, start time, and duration of the entire flow logic block. Separate execution details for each path, including their state and runtime, are also shown, enabling monitoring of parallel task progress.
Best Practices and Guidelines
- Avoid data dependencies between paths: Since paths can complete in any order, do not design one path to depend on data created or updated by another path to prevent inconsistent results.
- Do not share data across paths: Workflow Studio restricts sharing data pills between paths because the completion order is unpredictable, ensuring reliable flow behavior.
Related Concepts
This flow logic complements other flow management constructs such as Assign subflow outputs, Call a workflow, Dynamic flows, For Each, Try, Wait for a duration, and others, helping to build complex and efficient automation workflows.
Run actions and subflows in separate paths within an isolated flow logic block.
With this flow logic, you can run actions and subflows in separate paths. If any action within the Do the following in parallel flow logic block must wait, other actions run until all paths within the block finish processing.
Inputs
Do the following in parallel flow logic does not have field inputs. Instead, it displays a plus () icon that enables you to create a path with actions or subflows.
The actions and subflows in each path run until all tasks within the flow logic block have completed.
Outputs
This flow logic has no outputs, but actions and subflows in each path may have outputs. While the flow is running, outputs from a path are only accessible to other actions in the same path. After the Do the following in parallel flow logic completes, its final outputs are accessible to the rest of the flow.
Create two tasks in parallel when a change request is created
In this example, a flow triggers when a new change request is created. Using Do the following in Parallel, two tasks are created in separate paths and are assigned to different groups. The flow uses the Number field data pill from the triggering change request to display the number in the short description for the task record.
Execution details
- The header shows the state, start time, and runtime for the flow logic.
- The Configuration Details section shows the state, start time, and runtime for each path in the flow logic block.
General guidelines
- Avoid creating data dependencies between paths
- Since a flow can run paths in any order, avoid creating data dependencies between separate paths. For example, do not have one path that creates a record and another path that updates the same record. The update record path may run before the create record path.
- Do not share data between paths
- Workflow Studio prevents you from dragging data pills between paths because the system cannot determine which path will finish first to supply the output value.