# Collection datatype

**URL:** <https://forum.flowable.org/t/collection-datatype/759>\
**Category:** Flowable Engine\
**Created:** [July 22, 2017, 3:43am UTC](https://forum.flowable.org/t/collection-datatype/759 "2017-07-22T03:43:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rprakash88](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@rprakash88](https://forum.flowable.org/u/rprakash88)\
**Post date:** [July 22, 2017, 3:43am UTC](https://forum.flowable.org/t/collection-datatype/759/1 "2017-07-22T03:43:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [July 23, 2017, 8:39am UTC](https://forum.flowable.org/t/collection-datatype/759/2 "2017-07-23T08:39:22Z")

</div>

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](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)

---

<div class="post-metadata">

**Author:** ![rprakash88](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@rprakash88](https://forum.flowable.org/u/rprakash88)\
**Post date:** [July 24, 2017, 3:21am UTC](https://forum.flowable.org/t/collection-datatype/759/3 "2017-07-24T03:21:18Z")

</div>

Thanks Joram for the quick response
