Options

The ClosedOptions property box allows you to limit the number of times the Repeat activity can repeat.

The Repeat activity performs its contained activities as quickly as possible, so it is very resource intensive if it is left to repeat continuously. A continuously-repeating Repeat activity can quickly consume your Workflow Server's resources. We recommend either placing a Wait for Entry Change activity inside a Repeat activity (so that it pauses between repeating) or configuring the activity so that workflow itself (not a person) will satisfy the repeat activity’s condition.

Example: Bob wants his workflow to make two copies of a document. He adds a Repeat activity and places a Move Entry activity (configured to copy) inside it. Then he configures the Repeat activity so the Iteration token starts at one and configures the condition so the activity repeats twice. ClosedShow me what this looks like.

The Options property box offers an additional safeguard against runaway Repeat activities because it lets you limit the number of times the activity will repeat.

To configure Repeat Options

  1. Add the Repeat activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
  2. Select the activity in the Designer Pane.
  3. Under Options in the Properties Pane, configure the following.
    • To limit the number of times the activity will repeat, select Limit number of repetitions to. Type or use the scroll box (up-and-down arrows) to configure how many times the activity can repeat before it ends and the workflow continues. Alternatively, click the token button (right arrow) to use tokens.
    • Note: You can configure an iteration limit for all Repeat activities in the Advanced Server Options in the Workflow Administration Console. However, limits specified in the Repeat activity's Options property box will be used instead of the limit specified in the Workflow Administration Console.

    • Choose whether you want the activity to check its condition Before running contained activities or After running contained activities. If the condition is checked before the contained activities run, and the condition is initially satisfied, the activities inside the Repeat activity will be skipped. If the condition is checked after the contained activities run, the activities inside the Repeat activity will always run at least once, regardless of the condition.
    • Under Start the Iteration token at, select what number the Iteration token will start at when it begins to count the number of times the Repeat activity has repeated. If you select 0, the first time the Repeat activity runs the Iteration token’s value will be zero. If you select 1, the first time the Repeat activity runs the Iteration token's value will be 1.
    • Tip: If you are using the Iteration token to index a multi-value token, you may want to select 1 because indexes start at 1 instead of zero.