Logic Gate
The multi-rule decision engine. Evaluates one or more independent boolean expressions against the workflow context and routes the trigger pulse to specific output ports based on the result.
Spec v1.1
Multi-Rule Router
Port Overview
Input ports
eval
Logic Gate
Logic
Output ports
[ruleLabel_1]
[ruleLabel_N]
default
onError
Node Properties
Configuration for the rule set. Each rule defines a condition and a corresponding output port name. The node evaluates these rules against the WorkflowContext at runtime.
LogicGate
Evaluation Strategy
| Property | Type | Default | Description |
|---|---|---|---|
| logicMode | enum | Exclusive |
Exclusive — Evaluates top-to-bottom. Pulses the first matching rule and stops.Parallel — Evaluates all rules. Pulses every matching rule simultaneously.
|
| rules | array[obj] | [] | List of rules: { condition: expression, label: string }. The label becomes the output port name. |
| strictMode | bool | true |
true — Missing variables or null values trigger the onError port immediately (Recommended for safety-critical flows).false — Missing data resolves the specific condition to false instead of failing the node.
|
The Power of Parallel Evaluation
Unlike a standard If-Else,
Example (Facility Safety):
• Rule 1 (Fire):
• Rule 2 (Power):
If both conditions are met, both ports pulse. This is more efficient than chaining multiple If nodes and keeps the logic centralized.
Parallel mode evaluates every rule in the list. This allows a single node to categorize a complex state and trigger multiple specific actions simultaneously.
Example (Facility Safety):
• Rule 1 (Fire):
smoke > 0.5 → Port FireAlert• Rule 2 (Power):
voltage < 110 → Port BackupGenIf both conditions are met, both ports pulse. This is more efficient than chaining multiple If nodes and keeps the logic centralized.
Port Detail
Releases control signals to dynamic output ports based on rule evaluation.
Input ports
eval signal
The trigger signal. When pulsed, the node evaluates the
rules array based on the logicMode.Output ports
[ruleLabel] signal
A dynamic port created for each rule. Pulses if the rule's condition is
true.default signal
Fires only if no rules evaluate to
true. Acts as the fallback or "else" path.onError error
Fires if an expression cannot be resolved due to syntax errors or missing data.