Join / Merge
Consolidates multiple execution branches back into a single path.
Collects the results of the items a flow.split fanned out and emits them as one array, once the split done signal and every item have arrived.
This operator implements the 'Fan-In' synchronization pattern. It is essential when a concurrent split (Fan-Out) needs to be gathered back for aggregated processing. It waits for upstream signals based on the configured mode before proceeding.
Modes:
- Wait All: Blocks until ALL incoming branches have completed. Ideal for parallel processing where all results are needed.
- Wait Any: Proceeds as soon as the FIRST branch completes. ideal for race conditions or redundancy checks.
Output:
The result is an array containing the payloads from all joined branches: [result1, result2, ...].
How it works
- The engine buffers every arrival at a join node instead of running it. An arrival through a
doneport marks the gate ready and sets the expected count tototal_items; any other arrival adds its payload to the list. - When
donehas arrived and the list holds at least the expected count, the engine runs the worker once with the list asinputsand clears the gate. - The worker returns
{ merged, count, mode }throughout;mergedkeeps arrival order. - With "Execute step" (no engine inputs),
mergedis built from the outputs of the executed nodes in the run graph, or[payload]when there are none.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-collect-orders",
"label": "Collect orders",
"operator_slug": "flow.join",
"operator_version": "1.0.0",
"config": {
"mode": "wait_all",
"timeout_ms": 0
}
}{
"ok": true,
"data": {
"merged": [
{
"order_id": "ord_1",
"status": "synced"
},
{
"order_id": "ord_2",
"status": "synced"
}
],
"count": 2,
"mode": "wait_all"
},
"port": "out"
}Configuration
-
modestring Optional -
Strategy for synchronization.
-
timeout_msinteger Optional -
Maximum time to wait. 0 means infinite wait.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
mode - Only echoed in the output:
wait_anybehaves likewait_all. -
timeout_ms - Ignored: the join never times out.
Output ports
out default All items arrived after the split done signal.
{
"merged": [
{
"order_id": "ord_1",
"status": "synced"
},
{
"order_id": "ord_2",
"status": "synced"
}
],
"count": 2,
"mode": "wait_all"
}timeout Never emitted: timeout_ms is ignored.
error Never emitted by the worker.
In expressions
What a later node can read from this node's output with $("Join / Merge").item.json.<path> (write your node's label instead of Join / Merge). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Join / Merge").item.json.payload | — | |
$("Join / Merge").item.json.merged | — | |
$("Join / Merge").item.json.count | — | |
$("Join / Merge").item.json.mode | — |
— Editor: The editor suggests it, but the worker does not return it: it reads as undefined.
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Input contract
-
payloadobject Optional
Output contract
-
payloadarray<object> Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "flow.join",
"name": "Join / Merge",
"category": "flow",
"version": "1.0.0",
"description": "Consolidates multiple execution branches back into a single path.\n\n This operator implements the 'Fan-In' synchronization pattern. It is essential when a concurrent split (Fan-Out) needs to be gathered back for aggregated processing. It waits for upstream signals based on the configured mode before proceeding.\n\n **Modes:**\n - **Wait All:** Blocks until ALL incoming branches have completed. Ideal for parallel processing where all results are needed.\n - **Wait Any:** Proceeds as soon as the FIRST branch completes. ideal for race conditions or redundancy checks.\n\n **Output:**\n The result is an array containing the payloads from all joined branches: `[result1, result2, ...]`.",
"capabilities": [
"fan-in",
"aggregation",
"sync"
],
"config_schema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"wait_all",
"wait_any"
],
"default": "wait_all",
"title": "Join Mode",
"description": "Strategy for synchronization."
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait. 0 means infinite wait.",
"default": 0
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"description": "Receives multiple upstream payloads (handled by engine).",
"properties": {
"payload": {
"type": "object"
}
}
},
"output_contract_schema": {
"type": "object",
"description": "Array of results from the joined branches.",
"properties": {
"payload": {
"type": "array",
"items": {
"type": "object"
}
}
}
},
"ports": [
{
"port_id": "out",
"label": "Merged",
"is_default": true,
"description": "Active when join condition is met."
},
{
"port_id": "timeout",
"label": "Timeout",
"description": "Active if the join waits longer than the timeout."
},
{
"port_id": "error",
"label": "Error",
"description": "Active on internal failure"
}
],
"execution_mode": "sync",
"tags": [
"merge",
"aggregate",
"synchronize",
"fan-in"
],
"is_stateful": true,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"wait_all",
"wait_any"
],
"default": "wait_all",
"title": "Join Mode",
"description": "Strategy for synchronization."
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait. 0 means infinite wait.",
"default": 0
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"description": "Receives multiple upstream payloads (handled by engine).",
"properties": {
"payload": {
"type": "object"
}
}
}{
"type": "object",
"description": "Array of results from the joined branches.",
"properties": {
"payload": {
"type": "array",
"items": {
"type": "object"
}
}
}
}[
{
"port_id": "out",
"label": "Merged",
"is_default": true,
"description": "Active when join condition is met."
},
{
"port_id": "timeout",
"label": "Timeout",
"description": "Active if the join waits longer than the timeout."
},
{
"port_id": "error",
"label": "Error",
"description": "Active on internal failure"
}
]Execution
- Execution
sync- Stateful
- Yes
- Retries (
retryOnFail) - No
- Capabilities
fan-inaggregationsync- Tags
mergeaggregatesynchronizefan-in
Notes and limits
- Without an edge from a
flow.splitdoneport into the join, the join never runs: arrivals from ordinary parallel branches are buffered forever, nothing after the join runs, and the run still completes. - If an item branch ends elsewhere (an
errorport, afalseport without an edge) or the split usesbatch_size> 1, the expected count is never reached and the join does not run. - An empty array in the split sends only
done; the join then runs withmerged: []andcount: 0. - Join gates live in memory for the current run only.
Reviewed against the orchestrator code · 31e874b · 2026-11-26