Description:
This step performs a series of step N number of times
Inputs
- loopCounter - # of times to perform the loop
- variableName - variable to store loop data
Returns
- loop – returns this value for each iteration of the loop
- loopCompleted - returns this value once the loop is ended
Usage:
Example:
Let’s build and execute the “loopDef” example.
- Create a new definition called “loopDef”
- Select the definition and click the “design” button
- Drag “Loop, EvalExpression, UpdateVariable” step to the canvas
- Connect the dots between the Start and other steps as above
- Configure the connection lines between Loop, EvalExpression, and UpdateVariable steps as above
- Define variables/globals to store values during execution
- Click the “Loop” step to configure its “Settings” properties. Give the step a name, provide the loop value, and create a variable or global to store the result.
- Click the “UpdateVariable” step to configure its “Settings” properties. Provide a step name. Click the “Advanced” tab. Provide the variable reference and value. Select NO for “Has Expression” field.
- Click the “Evaluate Expression” step to configure its “Settings” properties. Provide the variable/global to store the expression result. Provide the expression syntax to evaluate.
- The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.
- Save the process definition, create a new process instance, and execute. Render the process instance. Click on the process step to view its properties. The step should be performed in a series of steps N number of times.
Definition Sample:
You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.
Click here to download the sample file.
The workflow can also be looped by routing the connection lines to the previous step. The connection line status must be configured to prevent an endless loop as shown below.