Description:
This step performs a series of steps 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 process definition called “loopDef” and open the definition in designer mode.
- Drag “Loop, EvalExpression, UpdateVariable” step to the canvas.
- Connect the dots between the “Start” and other steps, as shown above. Configure the connection lines between Loop, EvalExpression, and UpdateVariable steps, as shown above.
- Define a variable or a global to store values.
- Click the “Loop” step to configure its “Required” properties. Give the step a name, provide the loop value, and create a variable or global to store the result. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “UpdateVariable” step to configure its “Optional” properties. Provide a step name. Click the “Advanced” tab. Provide the variable reference and value. Select “No” for the “Has Expression” field if the variable value is not a C# expression. Click the Save button.

- Click the “Evaluate Expression” step to configure its “Required” properties. Provide a variable/global to store the expression result. Provide the expression syntax to evaluate. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- 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 instance, and then execute it. Render the process instance. Click the process step to view its properties. The step should be performed in a series of N steps.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-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.
