From Bright Pattern Documentation
• 5.19 • 5.8
Switch
The Switch scenario block allows you to create branches and alter control flow for your scenario based on specific variable values.
The block functions in the following way:
- A variable with known possible values is entered in the Variable to test field.
- Add a branch.
- On this branch, a known possible value is defined in the Variable value field.
- Each defined value becomes a possible block exit.
- When the block receives the defined variable, it looks for a matching value.
- If a match is found, the block exits along the defined value’s branch.
- If a match is not found (i.e., a variable’s value is not explicitly defined), the block takes the Default conditional exit.
Conditional Exits
Default
The Default conditional exit is taken if the defined variable’s value is not explicitly defined in the Values setting.
Settings
Title text
Title text is the name of the instance of the block. Enter a name in the text field and the new name of the block appears in the flowchart.
Variable to test
The Variable to test field is where to enter the name of the variable (e.g., var1 and not $(var1)).
Add branch
Variable value
The Variable value fields allow you to define a known possible value of the entered variable.
Exit label
The Exit label is the name of the branch’s exit.