Do the following in parallel flow logic
Summarize
Summary of Do the following in parallel flow logic
TheDo the following in parallelflow logic enables you to run multiple actions and subflows concurrently within isolated paths inside a single flow. This allows parallel processing of tasks without waiting for one path to complete before starting another. Although these paths run sequentially within a single thread context, they execute independently until all paths finish. This is useful for improving efficiency when you need to perform multiple tasks simultaneously within a flow.
Show less
Key Features
- Multiple paths: You add separate paths by clicking the plus icon, each containing its own actions or subflows.
- Independent execution: Actions and subflows in each path run independently until all complete.
- Single-threaded execution: Paths do not run in multiple threads, but execute within one flow execution context.
- No direct inputs or outputs: The logic itself has no inputs or outputs, but individual actions/subflows inside paths can produce outputs accessible within their paths and after completion to the rest of the flow.
Example Use Case
When a new change request is created, this flow logic can create two tasks in parallel, each assigned to different groups. Both tasks use the change request number in their short descriptions. This demonstrates how parallel paths can be used to perform related but independent tasks concurrently within a flow.
Execution Details
The flow header displays overall state, start time, and runtime. Each path shows its own execution details, helping you monitor parallel task processing.
Best Practices
- Avoid data dependencies between paths: Because paths run independently and may complete in any order, do not design paths where one depends on data created or modified by another.
- Do not share data between paths: Workflow Studio restricts sharing data pills across paths to prevent issues arising from uncertain path completion order.
Additional Information
If you require running subflows in separate flow contexts to fully isolate execution threads, consider using Dynamic flows, which consume more resources but allow greater parallelism.
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.