The Switch action is used to execute conditional actions based on a selection control mechanism. It allows the Switch value to change the control flow of the User Path execution via a multiway branch, named Case statements.

The Switch action is composed of one or several Case statements that are executed based on a defined value, and a Default statement that is executed if no other Case statement is matched.

Switch value

The Switch value is defined on the Switch logical action node. It may be a variable ${VariableName} or a static string.

Case statement

Case statements are children of the Switch. They are executed based on a case value defined on the Case Statement node. The case value must be a static string (cannot be a variable). The test is based on a equality of the string values.

Case statements can be added, moved, removed, disabled within the Switch.

Each case statement has a Break flag, that allows to stop the Switch execution when the case value matches the Switch condition. If the Break option is disabled, then the Switch execution will continue the evaluation of next Case statement.

Default statement

Default statement is static, it is the last statement of the Switch, and cannot be moved/deleted/disabled.


For example, let’s consider we have a Switch defined with value ${pageNumber}:

However, when the Break flag is disabled on the Case statements, then all Case statements are executed after a first match: