# Multiinstance Usertasks

**URL:** <https://forum.flowable.org/t/multiinstance-usertasks/9367>\
**Category:** Uncategorized\
**Created:** [May 18, 2022, 10:44am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367 "2022-05-18T10:44:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitcasso](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/bitcasso/32/2467_2.png) [@bitcasso](https://forum.flowable.org/u/bitcasso)\
**Post date:** [May 18, 2022, 10:44am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/1 "2022-05-18T10:44:50Z")

</div>

Hello  
I want to use a multi instance of usertasks which should work like subprocesses  
Unfortunately no usertask is created but the whole thing is skipped  
To test the process i set a variable of type list with the values 1,2  
After that i set the collection variable name of the usertask to the variablename and the elementvariable to a different variablename but the engine just skips the usertask (also if defined the multi instance type to sequential)  
I did not find anything in the documentation about this feature…  
Can anyone help ?

thanks

---

<div class="post-metadata">

**Author:** ![blinkin](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@blinkin](https://forum.flowable.org/u/blinkin)\
**Post date:** [May 18, 2022, 11:11am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/2 "2022-05-18T11:11:57Z")

</div>

@bitcasso Your collection variable is probably recognized as empty. So no task instance is created. How do you create your collection variable?

---

<div class="post-metadata">

**Author:** ![bitcasso](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/bitcasso/32/2467_2.png) [@bitcasso](https://forum.flowable.org/u/bitcasso)\
**Post date:** [May 18, 2022, 11:55am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/3 "2022-05-18T11:55:23Z")

</div>

Hello  
Thanks for your response. I already found the problem.  
I have a problem understanding the variable aggregator.  
The documentation does not help very much bc it’s confusing to me.  
what are all the source and target expressions ?  
I want to get sort a map of usertask/output

---

<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:** [May 18, 2022, 1:49pm UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/4 "2022-05-18T13:49:16Z")

</div>

Have you checked the blog about that topic: [Multi Instance Variable Aggregation](https://www.flowable.com/blog/multi-instance-variable-aggregation)

The ‘source’ is the variable of one instance, the ‘target’ is the name of the variable in the aggregated variable (created when the multi instance completes).

---

<div class="post-metadata">

**Author:** ![bitcasso](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/bitcasso/32/2467_2.png) [@bitcasso](https://forum.flowable.org/u/bitcasso)\
**Post date:** [May 19, 2022, 8:58am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/5 "2022-05-19T08:58:04Z")

</div>

Yes i have. I needed some time to wrap my head around this. I seems to work with a normal collection but not with a json array. Is there a way to cast a json array to a collection? I had some trouble bc flowable is not able to serialize my objects properly. It fails to serialize primitive types. Workaround was to convert it to a json array but now the flowable engine fails to recognize it as a collection.

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [August 17, 2022, 9:45am UTC](https://forum.flowable.org/t/multiinstance-usertasks/9367/6 "2022-08-17T09:45:57Z")

</div>

> [@bitcasso](#):
>
> I seems to work with a normal collection but not with a json array.

@bitcasso What exactly isn’t working with a JSON array?

Cheers,  
Filip
