How to repeat a activity

I want to repeat a set of activities for 5 times, can you tell how can i do that?

You can accomplish this by creating a counter and using a while loop to run the activities while the count<=5


Perform >Your set of activities (Invoke workflow, click or anything that qualifies as an activity)
Assign > Count=Count+1

Or you can use the inbuilt function/activity ‘Retry Scope’ which accepts boolean value for the condition area and accepts integer value for retry number of times in properties panel.

Hope this helps :slight_smile:


PS : There is something called a global exception handler too if you want to retry each and every activity a set number of times. This is useful because you need not run a loop for everything that you are performing. :slight_smile:

@Prakso_Prakso You can also do a For Each activity with “Enumerable.Range(1,5)” to do something 5 times. This way you don’t need to explicitly increment the count, it is done automatically for you.

1 Like