Fan-In Gate
The synchronization barrier. Harvests multiple parallel trigger signals and releases a single unified pulse once its synchronization condition is met. Essential for re-joining concurrent loops and parallel branches.
Spec v1.1
Sync Barrier
Port Overview
Input ports
arrive
reset
Fan-In Gate
Logic
Output ports
onComplete
onPartial
onTimeout
Node Properties
Configuration for the synchronization logic. The Fan-In Gate is "Context-Aware" and can automatically detect the expected arrival count when placed downstream of a Concurrent Loop.
FanInGate
Synchronization Logic
| Property | Type | Default | Description |
|---|---|---|---|
| mode | enum | All |
All — Wait for every incoming signal to arrive before firing.Any — Fire as soon as the first signal arrives (Race mode).Quorum — Fire once a specific number of signals arrive.
|
| expectedCount | int | auto | The number of signals to wait for. auto uses the parent loop's iteration count. |
| waitTimeoutMs | int | 0 | Maximum time to wait for synchronization to complete. 0 = wait indefinitely. |
Context Harvesting
| Property | Type | Default | Description |
|---|---|---|---|
| collectResults | bool | true | If true, the node "harvests" the shared state of all connected source nodes and consolidates them into a result array. |
The Harvesting Model
In the WBSKT "Shared-State" model, Fan-In nodes do not "receive" data over wires. Instead, they perform a State Sweep of the
WorkflowContext for all nodes connected to the arrive port, consolidating individual iteration results into a unified object.
Port Detail
Releases control signals and harvested results based on the synchronization outcome.
Input ports
arrive signal
Termination point for parallel branches. Each arrival increments the internal counter.
reset control
Clears the current synchronization counter and harvested results.
Output ports
onComplete signal
Fires when the sync condition (All/Any/Quorum) is met. Carries the harvested result array.
{
"summary": { "totalArrived": 10, "status": "Complete" },
"results": [ { "iteration": 0, "nodeId": "api_1", "data": { ... } }, ... ]
}
"summary": { "totalArrived": 10, "status": "Complete" },
"results": [ { "iteration": 0, "nodeId": "api_1", "data": { ... } }, ... ]
}
onPartial signal
Fires if the workflow is interrupted or stopped before completion, providing a snapshot of current progress.
onTimeout error
Fires if
waitTimeoutMs is reached before the synchronization condition is met.