FlowDecision

When to use the FlowDecision

The FlowDecision activity helps you validate a specified condition. You can execute a sequence based on the output of the validation. It checks whether a specified condition is met and executes either of the two branches.

Figure 1

Activity Name

Picture

FlowDecision

a

Technical Reference

Figure 1.1

p 

S.no

Description

1

Define the condition that you prefer to validate

2

Displays the action that the activity performs

3

False label denotes the branch through which further execution takes place when the condition is false

4

True label denotes the branch through which further execution takes place when the condition is true.

 t  In the Condition field, define a declared variable/condition that is required to be validated.
             
The input datatype should always be Boolean for the FlowDecision.
             
True and False labels can be changed based on requirements.

Scenario

Assume you are required to print the result by validating whether the value is lesser /greater than a defined value, as explained in the following illustration.

Illustration

a Activity: To validate the condition, use the Flow decision activity.

Let's start building the bot

Step 1 - Open the SmartRPA Designer tool
Step 2 - Open a new workflow
Step 3 - Find the Flowchart grouping in the Toolbox, drag a FlowDecision activity to the workflow. (Refer figure 1.3)

  • Declare a new variable datatype as Integer and enter 20 as the default value for validation (Refer figure 1.2)

Figure 1. 2

1.3

 

  • Go to the property section and define the condition to be validated in the condition field   e.g. Item<10, which implies the bot will check if Item>10 (Refer figure 1.2)
  • Under the True branch, connect a WriteLog activity to print. The given value is lesser than 10 message
  • Under the False branch, connect a WriteLog activity to print The given value is greater than 10 message.

Figure 1. 3

1.4