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
- On the Loop tab, set the Type to Repeat while true.
- 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.
- Enter a
condition in its text box. The activity evaluates this condition before each run. If the condition evaluates to
true
the activity runs.
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.