Creates a loop that executes activities declared inside the DoWhile activity while the condition is met.



  • Condition - The condition to be analyzed after executing the sequence within the body before repeating the loop.
  • DisplayName - Renames the activity.


  1. Rename the initial sequence to Main Sequence.

  2. Drag a DoWhile activity inside the Workflow area.

  3. By itself, a DoWhile activity could only hold one activity inside its body. Since we would need multiple activities within the body, let us add a Sequence activity to the Body section of DoWhile activityRename the Sequence to DoWhile Sequence.

  4. Create two variables called ctr and num with Int32 as its Variable Type, Main Sequence as their Scope, and 1 as their default value.

  5. Inside the DoWhile Sequence, add a Write Line activity.

  6. In the Write Line Text field, type num.ToString. This writes the value of num in the Output panel each time it is incremented.

  7. After the Write Line activity, add an Assign activity. 

  8. In the Assign activity's To field, input the num variable. In the Assign activity's Value field, type num + 1. This will increment the value of the variable by one.

  9. After the first Assign activity, add another Assign activity under it. 

  10. In the Assign To field, input the ctr variable. In the Value field, type ctr+1. This will increment the value of the variable by one.

  11. In the Condition field of the DoWhile activity, type ctr<5. The Sequence inside the body of the loop is repeated until the value of ctr is bigger than or equal to 5. 

    The use case should look like the following screenshot:

Application of Do While activity

The output should look like this in the Output panel:

The expected results to be shown on the Output panel