Type identifier:
control:switchCategory: Control Operations
Routes the run or data based on a single input value matched against configured cases. Supports control-flow branching and data-selection modes.
switchType: "control")Handle | Data Type | Required | Description |
|---|---|---|---|
|
| Yes | Execution trigger input |
|
| No | Value matched against configured cases |
switchType: "data")Handle | Data Type | Required | Description |
|---|---|---|---|
|
| No | Value matched against configured cases |
|
| No | Dynamic case input for each configured case |
|
| No | Fallback input when no case matches |
switchType: "control")Handle | Data Type | Description |
|---|---|---|
|
| Triggered when that case matches |
|
| Triggered when no case matches |
switchType: "data")Handle | Data Type | Description |
|---|---|---|
|
| Value from matched case input, or |
Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
| Yes |
| Display label for the node |
|
| Yes |
| Mode: branching the run or routing data |
|
| No |
| Type used to normalise input and case values |
|
| No |
| Case-sensitive matching in string mode |
|
| No |
| Ordered list of match cases |
value.Normalises the input:
inputType: "number": converted to a numberinputType: "string": converted to a string; missing input becomes ""cases in array order and selects the first match.default.switchType: "control": triggers one output handle (case-{id} or default).switchType: "data": reads matched input handle and sets output handle value.Scenario | Behaviour |
|---|---|
Non-numeric input in number mode | Matches no case; routes to |
Empty/undefined input in string mode | Treated as empty string |
Duplicate case values | First matching case wins |
Data mode with unconnected matched handle | Output |
{
"type": "control:switch",
"data": {
"label": "Route Status",
"switchType": "control",
"inputType": "string",
"caseSensitive": false,
"cases": [
{ "id": "ok", "value": "ok" },
{ "id": "retry", "value": "retry" }
]
}
}