Try OpenEdge Now
skip to main content
User's Guide
Setting workstep properties : Defining properties of Activity worksteps : Specifying general properties of Activity workstep : Defining a Loop condition
 
Defining a Loop condition
A Loop occurs when the workflow is repeated through the current workstep until a specified loop condition is met. To track the number of times the workstep is executed, you can define a counter that increments every time the loop is executed.
To define a Loop condition:
1. From the General tab of an Activity workstep’s Properties view, select the Loop checkbox, enabling the field and ellipsis button.
2. Click the ellipsis button to open the Loop dialog box, in which you can define the Loop condition.
3. Enter a variable (note that the variable must be a INTEGER dataslot type) by clicking the ellipsis button beside the Variables box. From the Select Dataslots dialog box, select a INTEGER dataslot type from those listed. Each time the workstep executes the loop, this variable is incremented by one.
4. From the Condition section, build a condition by selecting a dataslot from the drop-down list on the left and an operator from the middle drop-down list, and then selecting or entering a value in the drop-down list on the right. To enter a value:
a. From the drop-down list on the right, select Enter Value option to open the Enter Value dialog box.
b. Enter the value and click OK.
5. Click OK after defining the loop condition for this workstep.
As long as the defined condition is “true”, the workstep executes a loop. When the condition reads “false”, the workflow passes to the next workstep.
When a workstep is defined as a Looping workstep, the Loop ( ) icon appears within the workstep shape, indicating to other users that a loop occurs in this workstep.
Note: If a workstep has both a Skip condition and a Loop condition, then the Skip condition is evaluated first. If it evaluates to true, then the workstep is skipped; if false, then the workstep is executed and the Loop condition is evaluated. If the Loop condition is evaluated as true, then the Skip condition is evaluated again.
Note: You can enter a description (optional) for the Activity workstep in the Description tab. A description can have up to 4095 characters.