Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Building Flow Services | The REPEAT Step | Using REPEAT to Retry a Successful Step
 
Using REPEAT to Retry a Successful Step
Apart from using REPEAT to retry a failed step, you can also use it as a looping device to repeat a series of steps until a failure occurs.
If you use the REPEAT step to re-execute successful child steps, keep the following points in mind:
*The success condition is met if all children of the REPEAT step execute without returning a single exception.
*If one child in the set fails, the REPEAT step exits at the point of failure, leaving the remaining child steps unexecuted.
*To build a REPEAT step that repeats a set of successful steps
1. If you are inserting a REPEAT step into an existing flow service, display that service in the editor and highlight the step immediately above where you want the REPEAT step inserted.
2. Do one of the following:
*Click the button next to on the flow service editor toolbar and click .
*Click by the side of the flow service editor to open the Palette view. Click and drag it to the flow service editor.
3. Complete the following fields on the Properties view using the information in the table.
For this property...
Specify...
Comments
An optional descriptive comment for this step.
Scope
The name of a document (IData object) in the pipeline to which you want to restrict this step. If you want this step to have access to the entire pipeline, leave this property blank.
Timeout
Optional. Specifies the maximum number of seconds that this step should run. If this time elapses before the step completes, Integration Server issues a FlowTimeoutException and execution continues with the next step in the service.
If you want to use the value of a pipeline variable for this property, type the variable name between % symbols. For example, %expiration%. The variable you specify must be a String.
If you do not need to specify a time-out period, leave Timeout blank.
For more information about how Integration Server handles flow step timeouts, refer to the description of the watt.server.threadKill.timeout.enabled configuration parameter in webMethods Integration Server Administrator’s Guide.
Label
An optional name for this specific step, or a null, unmatched, or empty string ($null, $default, blank).
Important:
If you use this step as a target for a BRANCH or EXIT step, you must specify a value in the label property. For more information about the BRANCH and EXIT steps, see The BRANCH Step or The EXIT Step.
Count
The maximum number of times you want the children to be re-executed. If you want to use the value of a pipeline variable for this property, type the variable name between % symbols (for example, %servicecount%). The variable you specify must be a String.
If you want the children re-executed until any one of them fails (that is, no maximum limit), set this value to –1.
Repeat interval
The length of time (in seconds) that you want the server to wait between iterations of the children.
If you want to use the value of a pipeline variable for this property, type the variable name between % symbols (for example, %waittime%). The variable you specify must be a String.
Repeat on
SUCCESS
4. Beneath the REPEAT step, use the following steps to insert each step that you want repeat:
a. Insert a flow step using the buttons on the flow service editor toolbar.
b. Indent that flow step using on the editor toolbar to make it a child of the REPEAT step.
c. Set the properties for the child step as needed.
5. Click File > Save.