Returning Different Data From Each Sub-Process Instance

Procedure

  1. Specify an array data field that matches the type of a non-array sub-process/interface output parameter.
  2. In the "Map From Sub-Process" property tab, map the output parameter to that array field.

    At runtime the array field will be populated with the return data from each sub-process instance. The list element index will correspond to the activity loop index from which the sub-process instance was invoked.

    For example, if the sub-process returned an integer parameter "ReturnParam" with value "X-OK" when passed "X-Ray", "PL-OK" when passed "PlasterDept" and "PH-OK" when passed "Physio", and you mapped this to an array data field "ReturnArrayField", then:

    • ReturnArrayField.get(0) will be "X-OK"
    • ReturnArrayField.get(1) will be "PL-OK"
    • ReturnArrayField.get(2) will be "PH-OK"

Result

The way that this data is passed behaves in the same way for multi-instance statically defined sub-process tasks (tasks that reference an actual sub-process at design time).