Description
Activity to manage multiple decisions within a Flow Chart activity which would lead to specific results depending on the condition.
Attributes
Misc
- Expression - The expression to evaluate against the collection of cases.
Example
- Add a Flowchart activity inside a Sequence and double-click the activity.
- Create a String variable named input. Select Flowchart as its Scope.
- Inside the Flowchart activity, add an InputDialog activity and connect it to the Start.
- Add the input variable in the Result field under the Attributes panel of the InputDialog activity.
- In the InputDialog Title field, write "To-Do for Weekends", and in the Label field, write "Enter Saturday or Sunday".
- After the InputDialog activity, drag and connect a Flow Switch activity and choose String as its Variable Type.
- While the Flow Switch activity is clicked access the Attributes Panel and on the Expression field, type in input.
- Next to FlowSwitch activity, add a Message Box activity as the Default case of Flow Switch.
- Go to the Attributes Panel of the Message Box activity and under Content, input "Day not found".
- Add your second Message Box activity as the Saturday case of Flow Switch.
(Note: You can change the name of the case in the Case property of Flow Switch.) - Go to the Attributes Panel of the Message Box and under Content, type in "1. Send the Report to Sir John" + Environment.NewLine + "2. Go to the Supermarket.".
- Add your last Message Box activity as the Sunday case of Flow Switch.
- In the Message Box Content, write "1. Buy Flowers" + Environment.NewLine + "2. Do the Weekly Summary".
The use case should look like the following screenshot:
Multiple branches with different conditions
The output should be the pre-written text on the Saturday and Sunday Message Boxes unless the user chooses to type anything else aside from those two days, which would result to a Message Box saying Day not found. Please note that the Input Dialog is case sensitive!