iRobo.Activity.If

If activity is designed to make decisions based on the acquired values.


     Note: 

         If activity includes Then and ELse sections.  



                                                                                                               

Properties

Misc

  • Condition -  Condition executed in Then or Else sections.
  • DisplayName -  Activity header name.

Steps of Using If Activity

  1. Open iRobo Studio, and then open a new Workflow.
  2. Drag If Activity to the Sequence.
  3. Define condition according to which either the activities are executed in Then or  Else section.
  4. Click Play button to start the automated process.


Example on Using If Activity

To figure out how it's easy to make a decision, let's build an automation process that decide which number is greater than the other with a displayed message of  the decision.


  1. Open iRobo Studio, and then open a new Workflow.
  2. Create two input Integer Variables, Number1,Number2 in Variable Table.
  3. Drag  If Activity to the Sequence.
  4. In Condition section, type a condition that compares two numbers to find out which number is greater.

  1. In Condition section, add decision to get the greater number, Type: Number1 > Number 2.
  2. Under Then & Else sections, add two WriteLine Activity as a first condition.
  3. For Then Condition, type Number1.ToString + "is greater than" + Number2.ToString.
  4. Under Else Condition, type   Number1.ToString + "is smaller than" + Number2.ToString. 
  5. Click on Debug File for execution.
  6. Insert numbers upon request, and then check the result in Output Panel.

  1. Click Save button from iRobo Studio Menu to save Workflow.
  2. Click Play button to start the automated process.

    

Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator