Wednesday, September 17, 2014

Passing individual elements of list into multi-instance loop

Problem Statement

You have an activity that is implemented as a multi-instance loop. You want to pass each instance of the task a different data object to work on. You have sorted all the objects into a list. Now, you need to pick the appropriate object from the list and pass them into the individual tasks created by the multi-instance loop.

Solution

Use tw.system.step.counter. This holds the value of the loop counter in the multi-instance loop.