Checks the defined condition at the beginning of this activity and creates a loop that executes an activity inside the body while that condition is met.



  • Condition - The condition required in order for the activity/activities to be executed.

  • DisplayName - Renames the activity.


  1. Name the initial Sequence as Main Sequence.
  2. Add a While activity inside the Workflow area.

  3. In the Body, add a Sequence activity.

  4. Create an Integer variable, num, with the Main Sequence as its Scope. On the Default field, write 1.

  5. Create another Integer variable, ctr, still having Main Sequence as its Scope. On the Default field, type 1.

  6. Add a Write Line activity inside the While activity's Sequence.

  7. In the Write Line Text field, write num.ToString. This displays the value of the num variable when executed.

  8. Add an Assign activity.

  9. In the Assign To field, write num, and in the Assign Value field, write num + 1. This increments the value of num variable by one.

  10. Add another Assign activity.

  11. In the Assign To field, write ctr, and in the Assign Value field, write ctr + 1. This would also increase the value of the ctr  variable by one.

  12. In the Condition field of the While loop activity, write ctr < 5. This means the sequence of activities inside the Body will continuously execute until the value of ctr, that serves as the counter, reaches 5. 

    The use case should look like the following screenshot:

The output should look like this in the Output panel:

Expected results to be shown on the Output panel