A switch compares its value; it does not evaluate it
Despite the parameter's name, a switch gateway runs no expression engine. The value is matched against each branch as it stands.
The rule
Normative: this is the rule
- A switch gateway does not evaluate its
expression. - The value is compared unchanged against each branch's
valuein declaration order, with no coercion: a branch matches only where the two are of the same type as well as equal. - The first matching branch is the sole active branch, and its name is what the gateway reports as active.
- Where no branch matches, the branch named by
default_branchis active; where no branch matches and no usable default is named, the node fails.
Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0-draft · LANG-27 · changed in spec 1.0