IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Create a business process definition (BPD) > Implementing activities > Create loops

Configure an activity for simple looping

Follow these steps to configure an activity for simple looping.

When you model an activity with simple looping, the required number of instances is dynamically created, up to the loop maximum value that you specify. A simple-looping activity is run sequentially until the last instance of the activity is run. When you run an activity configured for simple looping, a single token is generated and used for each instance of the activity, which, in effect, recycles the runtime task.


Procedure

  1. Select the activity that you want to configure in the BPD diagram.

  2. Click the General option in the properties.
  3. Under Behavior, select the Simple Loop option from the Loop Type list.
  4. Under Simple Looping, type a value in the Loop Maximum box. This value sets the maximum number of instances that can be created at run time.

    If you declare a variable that can be used for this setting, click the variable icon to select it or type the variable name into theLoop Maximum box.

  5. In the Loop Condition box, type an optional JavaScript condition to dictate the runtime looping behavior. A condition is evaluated before any instances are created from the activity. If the condition is not met, the looping does not occur.
  6. Save your changes.


Results

When you configure an activity for simple looping, the activity includes the indicator shown in the following image:

Create loops