Accessing the Activity Outputs in Repeat While True Loop

This feature is useful when an activity needs to use the loop feature to do batch processing or fetch multiple records by running the activity multiple times. With each iteration of the activity, the output is available for mapping to the activity input.

This feature is available in all activities that generate an output (have an Output tab).

To use this feature:

    Procedure
  1. On the Loop tab, set the Type to Repeat while true.
  2. Set the Access output in input mappings to Yes.

    This makes the output of the activity iteration available in the Upstream Output for mapping. Now you can map your output as a next input parameter.

  3. Enter a condition in its text box. The activity evaluates this condition before each run. If the condition evaluates to true the activity runs.
Note: The output is only available in subsequent iterations after the first iteration. Since the activity output is not available for the first iteration, your condition must perform a check to see if it is the first iteration of the activity.

For example, use $iteration[index]> 0 && isdefined($activity[SFQuery].output.locator) to begin your condition. The $iteration[index]> 0 checks to make sure that it is not the first run of the activity. The isdefined($activity[SFQuery].output.locator) function checks whether the output field exists.