Collection datatype

Hi

I am using multi-instance loop for a user task. I am able to create number of multiple user task (say 5) either sequentially or in-parallel using 5 tag. But i could not assign the task to list of users in an array.

I checked the user guide, and found option for it by using, but couldn’t succeed

Please can you help me on implementing below items w.r.t Multi-instance loop (user task)

  1. I could see default data types provided by Flowable BPM. But how to bring Collection data type into the flowable system?

  2. Also how to collect the response/decision from all list of users in a List variable?

  3. Is there is any sample implementation for the Multi-instance loop?

Appreciate your help.

Thanks

  1. It needs to be an instance of java.util.Collection. You can also use a bean that returns such collection: ${myBean.getCollection() for example}, such that you don’t have to store it in a process variable.

  2. You will have to store the results on a local variable (execution.setVariableLocal) and process them after the multi instance, or put the result in a process instance variable in a map/list or whatever container variable.

  3. Sure, check the unit tests: https://github.com/flowable/flowable-engine/tree/master/modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/multiinstance (the java counterpart starts with the same name)

Thanks Joram for the quick response