Skip to main content

Fork Branch

Creates multiple branches of automation path.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Input - Data to be passed to the multiple branches of automation path.

Output

  • Wait Group Id - Id of the wait group for synchronizing the branches.
  • Branch Id - Id of the specific branch of automation path.

Options

  • Number of Branches - The number of new branches to create.

Wait Group Id and Branch Id are automatically generated and sent with fork branch node. You do not need to provide them.

How It Works

The Fork Branch node enables parallel execution by creating multiple independent automation paths:

  1. The node receives input data and the number of branches to create
  2. A wait group is created to synchronize all branches
  3. For each branch (minimum 2):
    • A unique Branch ID is generated (format: {index}.{waitGroupId})
    • The wait group counter is incremented
    • Input data is cloned and transmitted to the branch with its unique ID
  4. The node waits for all branches to complete execution
  5. Once all branches finish, the wait group is cleaned up
  6. Flow continues to the next node with the original input data

Requirements

  • Number of Branches must be at least 2
  • Each branch should eventually complete to avoid deadlock
  • Sufficient system resources to handle parallel execution

Error Handling

Error CodeDescriptionSolution
Core.Flow.ForkBranch.ErrOnCreateFailed to parse node configurationVerify node configuration is valid JSON
Core.Flow.ForkBranch.OnMessageMessage parsing failed during executionCheck that input message format is valid
Core.Flow.ForkBranch.OnMessage"Nof Branches should be minimum 2"Set Number of Branches to 2 or higher

Usage Examples

Example 1: Processing Multiple Data Sources in Parallel

Process data from different sources simultaneously:

Input: \{ "customerData": \{...\}, "orderData": \{...\} \}
Number of Branches: 2

Branch 1: Processes customer data from CRM
Branch 2: Processes order data from database

Both branches complete, then merge results

Example 2: Multi-Platform Notifications

Send notifications to multiple platforms concurrently:

Input: \{ "message": "Order #12345 shipped", "orderId": "12345" \}
Number of Branches: 3

Branch 1: Send email notification
Branch 2: Send SMS notification
Branch 3: Update order status in database

All notifications sent in parallel for faster execution

Example 3: Parallel Web Scraping

Scrape multiple websites simultaneously:

Input: \{ "urls": ["site1.com", "site2.com", "site3.com"] \}
Number of Branches: 3

Each branch:
- Opens browser for assigned URL
- Extracts data
- Saves to separate file

All scraping happens in parallel, reducing total time

Usage Notes

  • When Continue On Error is enabled, errors in branches are not caught even if a Catch node is present
  • Each branch receives a complete copy of the input data
  • The Wait Group ID and Branch ID are automatically added to the message payload
  • All branches must complete before the main flow continues
  • Branches execute independently and in parallel
  • The second output port fires only after all branches complete

Tips

  • Use Fork Branch when tasks are independent and can run simultaneously
  • Avoid using Fork Branch for sequential dependencies between tasks
  • Monitor system resources when creating many branches
  • Consider using variables to dynamically set the number of branches
  • Combine with decision nodes in each branch for conditional parallel processing
  • Each branch can have its own error handling logic
  • Use the Branch ID output to identify which branch is executing (useful for logging)
  • For best performance, ensure each branch has similar execution time
  • Sub Flow - For organizing reusable workflow components
  • Go To - For conditional flow navigation
  • Stop - For terminating specific branches early