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

Well,

While(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:

Regards.

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:

1 Like

@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.
image

5 Likes