Flow Services-Repeat Continue

Specifying the REPEAT Condition :

When you build a REPEAT step, you set the Repeat on property to specify the condition(success or failure) that will cause its children to re-execute at run time.

If you set “Repeat on” to… The REPEAT step…

FAILURE Re-executes the set of child steps if any step

in the set fails.

SUCCESS Re-executes the set of child steps if all steps

in the set complete successfully.

Setting the REPEAT Counter

The REPEAT step’s Count property specifies the maximum number of times the server re-executes the child steps in the REPEAT step.

If you set “Count” to… The REPEAT step…

0 Does not re-execute children.

Any value > 0 Re-executes children up to this number of times.

-1 or blank Re-executes children as long as the specified

Repeat on condition is true.

Important: This process continues until the repeat condition is false or Count is met, whichever occurs first.

When Does REPEAT Fail?

The following conditions cause the REPEAT step to fail:

If “Repeat on” is set to… The REPEAT step fails if…

SUCCESS A child within the REPEAT block fails.

FAILURE The Count limit is reached before its children

execute successfully.

If the REPEAT step is a child of another flow step, the failure is propagated to its parent.

The Timeout property for the REPEAT step specifies the amount of time in which the entire REPEAT step, including all of its possible iterations, must complete. When you use REPEAT to retry on failure, you may want to leave the Timeout value at 0 (no limit) or set it to a very high value. You can also set the property to the value of a pipeline variable by typing the name of the variable between % symbols. The variable you specify must be a String.

*As simple repeat is same like DO WHILE LOOP, it execute first then will check the conditions.

*You can also use the REPEAT function to perform operations similar to LOOP. If you are familiar with Java, you can think of a REPEAT as a “while loop” (Using Repeat with Branch as a ffIterator switch variable and Exit flow step).