A conditional activity that executes the "Then" path if the condition is met or the "Else" path if otherwise.
Condition - The condition to be analyzed before executing one of the two paths.
DisplayName - Renames the activity.
- Rename the initial Sequence as Main Sequence.
- Create a variable named inputType with a Variable Type of String.
- Add an InputDialog Activity inside the Main Sequence.
- For the InputDialog's Title, type "RPA" and for Label please input "What is the Password?"
- Go to the InputDialog's Attribute Panel and place InputType on the Result attribute.
- Create a Boolean variable named matched. Select Main Sequence as its Scope.
- Create a String variable named pattern with Main Sequence as its Scope and "Robotic Process Automation" as its Default Value.
- Insert an Is Match activity after the InputDialog activity, and on the Result attribute inside the Is Match activity's Attribute Panel, type in matched.
- In the Is Match Input field, write inputType, and in the Pattern field, type pattern.
- After the Is Match activity, add an If activity and write matched = True in the Condition field.
- Inside Then, add a Write Line activity.
- In the Write Line Text field, write "Matched!".
- Inside Else, add a Write Line activity.
- In the Write Line Text field, write "Wrong Password!".
The workflow should look like the following screenshot:
Once the user executes the workflow, a message box would be shown and if they type in Robotic Process Automation and they press the Enter key or click on the OK button:
The Output Panel would show the text Matched!
Here is an example of what would happen if a user did not type the expected text.
The Output Panel would show the Wrong Password! text as shown on the images below.