Description

A conditional activity that executes the "Then" path if the condition is met or the "Else" path if otherwise.




Attributes

Misc

  • Condition - The condition to be analyzed before executing one of the two paths.

  • DisplayName - Renames the activity.


Example

  1. Rename the initial Sequence as Main Sequence.



  2. Create a variable named inputType with a Variable Type of String.



  3. Add an InputDialog Activity inside the Main Sequence.



  4. For the InputDialog's Title, type "RPA" and for Label please input "What is the Password?"


  5. Go to the InputDialog's Attribute Panel and place InputType on the Result attribute.



  6. Create a Boolean variable named matched. Select Main Sequence as its Scope.


  7. Create a String variable named pattern with Main Sequence as its Scope and  "Robotic Process Automation" as its Default Value.


  8. 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.





  9. In the Is Match Input field, write inputType, and in the Pattern field, type pattern.



  10. After the Is Match activity, add an If activity and write matched = True in the Condition field.



  11. Inside Then, add a Write Line activity.


  12. In the Write Line Text field, write "Matched!".


  13. Inside Else, add a Write Line activity.


  14. 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.