iRobo.Activity.While

While activity helps to execute a repeated process. 

It is used either to go through an array of elements, or execute a specific activity multiple times. 


     Note: 

         While loop executes a statement as long as a given condition is True

         The condition is evaluated before the Body of the loop is executed.

                       

                                                                               

Properties

Misc

  • Condition -   Get Condition value. 
  • DisplayName -  Activity header name.

                                                       

                                               

Example on Using While Activity

To better understand While Activity, let's build an automated process that counts a Counter value with a condition, and displays its value in a MessageBox with the counted number.


  1. Open iRobo Studio, and then open a new Workflow.
  2. Drag While Activity to the Sequence.
  3. Create Counter Variable in Variable Table with Integer Data Type.
  4. Specify Counter Variable Scope in Variable Table as: "Sequence".
  5. In While Condition, add Counter <5.
  6. Drag Assign Activity to the While Sequence.
  7. Assign Counter Variable to Assign Activity, Counter = Counter +1 ,as shown in the image below.

     

  1. Drag MessageBox Activity to the While Sequence as shown in the image below.

     

  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: Generate Kindle eBooks with ease