Conditional Branching

 

Introduction

A conditional branching task is used to provide conditions into the automation such that the conditions will get executed only if it’s true, If any condition turns out to be false, the next condition will be checked.

 

 

Description

You can use the following types of expressions to work in automation-

  1. == =!: These operators are used to denote equality
    For example,

    width==0 (where width is 0)
    OR
    width=!0 (where width is not 0)

  2. ><: This operator is used for the comparison purpose in the automation
    For example,
    A>B (Prints that A is greater than B)
    A<B (Prints that A is smaller than B)

    All the basic expressions(applied on a string, number, boolean) supported by java you can be written into the conditional equation


Steps to configure

  1. Drag and drop the conditional branching task from the helper section and connect it with other tasks.

  2. Once you connect the conditional task, an input field will appear in the connection itself named as add equation.
    Each connection will have such an input field. Then you can add multiple conditions.

  3. Click on condition and the below form will appear on the right side of the screen.

     

  4. To add a condition, you first need to feed desired data from the data slot followed by the condition in the conditional expression field. A conditional expression has a general form. where expr1 is an expression that yields a true or false result. If the result is true, the value of the conditional expression is set to expr2. If the result is false, the value of the conditional expression is set to expr3.

  5. Click on save to successfully save the condition.