Table Description
Iteration: The details of each iteration of a loop block in a workflow Process Instance.

Each time a LoopBegin activity in a loop block (LoopBegin/LoopEnd activity pair) is executed, the details of the current iteration are stored in this table.

All Activity Instances and Transition Instances created within the context of a loop iteration will have a reference to the Iteration under which they were created.

Example

You define a workflow (Process Definition) to allow Users submit a Case for approval. The activities defined in your workflow are:

  • 'Loop Begin' (An activity that indicates the start of a loop block) with loop condition 'While the case has not been approved, do the following'.
  • Submit the Case for approval. (manual)
  • Examine the Case and determine whether it should be approved (manual).
  • 'Loop End' (An activity that signifies the end of a loop block).
  • Notify the Case owner of the Case approval (automatic).

Ronan Rooney requires to submit a case for approval. A Process Instance of the desired workflow is enacted and an instance of the 'Loop Begin' activity is executed. An iteration record of the loop is written to this table with an iteration count of zero (the first iteration of the loop).

When Ronan Rooney submits the desired case for approval, an Activity Instance of the 'submit for approval' manual activity is created. As this activity is in a loop, the Activity Instance is associated with the iteration Id of the iteration record created.

John Smith examines the case in the second manual activity (which has its own Activity Instance associated with the iteration Id of the iteration record created) and does not approve it. The Approver adds comments to explain why the case was not approved.

The workflow engine determines that the loop should iterate again. It creates a new record in this table, incrementing the iteration count by 1 for the associated 'Loop Begin' Activity Instance.

Ronan Rooney examines the comments on the case approval, makes the necessary changes and submits the case for approval once more. This Activity Instance contains a reference to the second iteration record written to this table for the 'Loop Begin' Activity Instance.

John Smith examines the case again and decides to approve it.

The workflow engine determines that the loop should exit, and the case owner is notified of the case approval.

Relationship Diagram
Click the diagram to manipulate and zoom. Traverse the diagram using Click-and-Drag motions.
Attributes (7)
AttributeKeyNullableDescriptionDDL Type
iterationIDYesNoUniquely identifies a single iteration of a loop in a process instance.SVR_INT64
loopActivityInstID NoThe ID of the loop ActivityInstance of which this is an iteration. In other words 'this is the Nth iteration of the Loop Activity identified by loopActivityInstID'.SVR_INT64
iterationCount NoThe number of times the loop activity has iterated.SVR_INT32
startDateTime NoThe DateTime at which this iteration started.SVR_DATETIME
endDateTime  The DateTime at which this iteration ended.SVR_DATETIME
processInstanceID NoThe ID of the process instance which contains the loop activity of which this is an iteration.SVR_INT64
lastWritten   SVR_DATETIME
Foreign Keys (6)
ChildParent
Iteration.loopActivityInstIDActivityInstance.activityInstanceID
Iteration.processInstanceIDProcessInstance.processInstanceID
ActivityInstance.iterationIDIteration.iterationID
FailedMessage.iterationIDIteration.iterationID
SuspendedActivity.iterationIDIteration.iterationID
TransitionInstance.iterationIDIteration.iterationID
Indices (2)
Index NameAttributes
IND__34869674loopActivityInstID
IND__1258591427processInstanceID
Related Pages (5)