Whats the recommended method to implement iteration..?

(Naran M) #1

Hi,

Whats the recommended method to implement iteration…? I am trying to iterate HTTP request based on the result received from the action. Ex:- If I receive the count as 5, I need to iterate the HTTP request 5 times. I tried with labels but was not successful.

Thanks,
Naran

(Daniel Beckett) #2

@Naran

Using Label and Goto a Label is usually the best way to handle iteration. You could have a counter Attribute that increases by one with each pass inside the loop and then for your Goto a Label action have a filter set so that the loop ends once the counter value = the result value.

Although it’s not an exact match, here’s an example flow that shows how to loop through using a counter attribute.

(Naran M) #3

Thanks Daniel. Perfect solution worked like a charm.