Configuring unconditional parallel branch
To configure an unconditional parallel branch node, call theparallel() method in your agentic workflow. Use this node when you want every branch to run every time. Define the following parameters in this method:
Use unconditional parallel when you need to:
- Run multiple teams at the same time
- Send work to multiple services at the same time
- Process data through multiple pipelines at the same time
Set to
None for unconditional execution. All branches run.Name for the parallel node. watsonx Orchestrate generates this value if you do not provide it.
Display name for the parallel node.
Example
Configuring conditional parallel branch
To configure a conditional parallel node, call theparallel_conditions() method in your agentic workflow. Use this node when you want to run every branch whose condition matches. Define the following parameters in this method:
Use conditional parallel when you need to:
- Process work based on multiple criteria
- Route work to multiple handlers based on attributes
- Fan out work only when conditions match
Name for the parallel node. watsonx Orchestrate generates this value if you leave it empty.
Display name for the parallel node. The default value is the node name.
Adding conditions to parallel branch
To add conditions to the parallel branch node, call thecondition() method. The node runs all matching conditions in parallel. Define the following parameters in this method:
Node to run when the condition matches.
Python expression to evaluate. Required unless
default=True.When set to
True, this parameter defines the default case.Example
Expression syntax
Conditions in parallel agentic workflows use Python expressions that can access:flow.input.*- Input dataflow.private.*- Private stateflow.output.*- Output data from upstream nodes
Common patterns
The following examples show common ways to use parallel nodes in your agentic workflows:- Fan-Out Processing
- Conditional Multi-Handler
- Parallel with Aggregation
Use this pattern to process data through multiple independent handlers:
Best practices
Follow these best practices when you work with parallel nodes:Choose the Right Node Type
Choose the Right Node Type
- Use
parallel()when every branch must run - Use
parallel_conditions()when branch execution depends on conditions - Use
conditions()(branch) when only one path must run. For more information, see the Conditions branch node
Avoid Infinite Loops
Avoid Infinite Loops
The following example shows an incorrect pattern:
Merge Parallel Paths
Merge Parallel Paths
Parallel agentic workflows merge at the
END node inside the parallel subagentic workflow. The parent agentic workflow continues only after every parallel branch completes.Example
Handle Errors in Parallel Branches
Handle Errors in Parallel Branches
Each parallel branch can fail independently. Add error handling so you can manage failures:
Example: Feature delivery agentic workflow
This example shows how you can use both conditional and unconditional parallel processing to complete feature delivery work.Example

