Switch
Description
Routes execution to a case pin whose configured value matches the value input. Falls through to the default pin when no case matches. Case pins are configured per node instance; the value input is generic and locks to its connected type at design-time.
When to use
Use Switch when execution needs to branch to one of several distinct paths based
on a single value — for example, routing by HTTP method, status code, or a string
category. Each case pin is configured with a literal value at design-time; the node
fires the first matching case pin, or default if none match. For a two-way
boolean choice, Branch is simpler.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Value | generic | — | The value to match against. The type resolves to the connected source's type at design-time; all case values must be the same type. |
Execution pins
| Pin | Direction |
|---|---|
| In | Input |
| Default | Output |
Example
Route an incoming HTTP request to different handlers based on method. Wire the Method
output of Receive HTTP into the Value input of Switch. Add case pins for "GET" and
"POST" in the node configuration and wire each to its handler. Connect the Default
execution output to a Fail node to reject unsupported verbs.