Iterate

An Iterate group repeats the series of grouped activities once for every item in an existing sequence or list. The list can be items of any datatype. The loop executes for the number of iterations specified.

General

This process performs the following operations:

  1. A JDBC Query activity (CustomerQuery) is used to query a database and populate a list of customer records. The customer records are then passed to a group containing the Log activity.
  2. The Log activity writes the name and address of each customer to a log and appends to the log as each record is written.
  3. The group iterates once for every customer record returned by the CustomerQuery activity.
  4. The process then reads the log that was written for its data to be available to the process, and then transitions to a SendMail activity to send the contents of the customer list through email.

The General tab has the following fields.

Field Description
Name The name to be displayed as the label for the activity in the process.
Group Type The type of group. The default is Iterate.
Index Name The index name.
Note: Select the Global check box to make the index variable available for the activities outside the loop.
Variable List This field is an XPath expression. XPath is used to specify the schema element you want to refer to.

Click the Edit XPath Expression icon to specify a value for this field in the XPath Builder wizard.

You can use a simple expression containing a complete list, or a more complex one and only process certain items in the list.

Iteration Element Provide a name for a process variable containing the current iteration element in this field.
Note: Select the Global check box to make the Iteration Element available for the activities outside the loop.
For more information, see Call Process
Accumulate Output Select this check box to accumulate the output of one of the activities in a group.

The output of the selected activity is accumulated each time the activity is executed.

Output Activity Select the activity from the group of activities for an output reference when executing the loop.
Output Name The name of the list of the accumulated output of the selected activity.
Reset Variables The variable to be reset during each iteration of the Iterate group.

Click the Add icon, and select the variable to be reset.

To delete the variable, click the variable in the Reset Variables field. The Remove icon with a tooltip 'Remove <variable name> 'is displayed. Click the Remove icon to remove the variable from the Reset Variables field.

Description

Provide a short description for the activity in this field.

Variables

A group of shared variables. Depending on the group selected in Group Type, Container displays the group. For example, if the Iterate group is selected in the Group Type field, it displays Iterate in Container. You can add multiple variables of complex or simple type.

You can select from the following available Variable Type options:

  • String
  • Integer
  • Decimal
  • Boolean
  • Date&Time