Docs Menu
User Guide / Control Structures / Repeat

Repeat Statements

These statements behave like loops but the only difference is that the loops iterate till the end of the array/list is not reached but the repeat statement retries (repeats) itself. When the service will be executed it will wait for the delay time period that was specified in the Repeat statement. Once the delay time will elapse then only the response will be provided by the server.

To create a new Repeat in the workspace right-click on the workspace and select Repeat.

Root Properties

Repeat Properties.

Root Properties

The various properties of the Repeat statement are explained below:

It has six main properties

Status: To enable/disable the Repeat Block. The default status will be in enabled mode. If the status is selected as disabled in the Repeat and further steps will not execute when the API will be invoked either from HTTP or from another service.
Snapshot: Create a runtime data state snapshot for the Repeat statement. By default, it is disabled.
Comment: Add comment to the Repeat Statement.
Interval: This specifies the delay in every Repeat. The value of the interval is in milliseconds. The value is specified as an integer.
Repeat: This specifies the number of times the repeat function is to be performed. The value is always an integer.
Repeat on: It specifies when the repeat has to be implemented. It has two events.

error          when the Repeat-on option is kept on error, the Repeat statement gets executed on the occurrence of an error. It will not affect the delay or the interval values of the Repeat Statement.

success     when the Repeat-on option is kept on success, the Repeat gets executed when the status of the Repeat statement is enabled.