Fusion
Merges results from multiple parallel branches into a single flow. Waits for all branches to complete before continuing.
Common parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
mergeStrategy | choice (all, first, last, race, concat, zip) | Yes | No | Strategy for merging parallel branches. (Default: "all") |
branchCount | number | Yes | No | Number of input branches to merge. (Default: 2, min 2, max 8) |
outputVariable | text | No | No | Output variable name containing the merged result. |
Parameters by strategy
all — All
Waits for all branches to complete before continuing.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
waitForAll | boolean | No | No | Block until all branches have completed. (Default: true) |
first — First
Returns the result of the first completed branch.
last — Last
Returns the result of the last completed branch.
race — Race
The first branch to finish wins. Others are discarded.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
raceTimeout | number | No | No | Timeout in milliseconds. Error if no branch completes in time. 0 or empty = no timeout. (min 0, max 60000) |
concat — Concat
Concatenates arrays from each branch into a single array.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
order | choice (sequential, completion) | No | No | Concatenation order: sequential (branch order) or by completion order. (Default: "sequential") |
zip — Zip
Combines results element-by-element, like zipping arrays together.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
zipMode | choice (shortest, longest) | No | No | Zip mode: stop at the shortest array, or fill missing values. (Default: "shortest") |
fillValue | dynamic value | No | Yes | Fill value for 'longest' mode when an array is shorter. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : mergedData
{
"branches": []
}
Example
Merge results from two branches.
Input :
{}
Output :
{"branches": [{"branchId": "branch-1", "data": {"score": 85}}, {"branchId": "branch-2", "data": {"score": 92}}]}
Tip
{{mergedData.branches}} is an array containing each branch result. Use a Transform block after the merge to restructure the data.