Iterator task

An Iterator task contains a sequence of tasks that may be performed multiple times, once for each record associated with a specified workflow task. Iterators are used to loop through a finite set of records and perform one or more tasks individually on the records that the Iterator loops through.

The following figure shows an example of a workflow that contains an Iterator task.
Figure 1. Iterator example
The image is explained in the text.

One thing to notice about the Iterator task as it appears in the figure is that the end of the Iterator task is the Iterator palette shape upside down.

Here is a summary of what the workflow in the figure does:
  • It retrieves work orders associated with a person.
  • The Iterator task performs the workflow tasks inside of it, once for each retrieved work order.
  • Using a complex condition, the Switch task determines if each work order is proceeding normally or is a problem.

The properties for an Iterator task specify which other task's associated records will be used for looping. An Iterator task performs the sequence of tasks it contains once for each record associated with the specified task. Each time it performs the sequence of tasks, the Iterator task becomes associated with a different one of the records that is associated with the other task.

The properties form for an Iterator task is organized into two sections. Here are descriptions of the fields in the first section:
Label
This is the label used to identify this task. This field's text appears on the shape in the drawing that represents this workflow task. Use the standards in Workflow naming conventions.
Description
A description of this task goes in this field.