Skip to main content

Switch

Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria

Properties

NameTypeRequiredDescription
switchcase[]yesA name/value map of the cases to switch on

Example

Switch Case

Defines a switch case, encompassing a condition for matching and an associated action to execute upon a match.

NameTypeRequiredDescription
whenstringnoA runtime expression used to determine whether or not the case matches.
If not set, the case will be matched by default if no other case match.
Note that there can be only one default case, all others MUST set a condition.
thenflowDirectiveyesThe flow directive to execute when the case matches.