How can I assign a Multi-Instance User Task to multiple users?


#1

Hi to all.

My process scenario:

In my process scenario, one user (the Central Administrator) submits a form with a list of products.
On the submission of this form, the list of products must be automatically sent to multiple users (Representatives) who are the assignees for the Multi-Instance Task (Select from the list of products).
If the number of those users is small (e.x. 5), I’ve found the way to assign the Multi-Instance User Task.
But, what if the number of those users (Representatives) is big (e.x. 30)?
How can I assign a Multi-instance Task to a big number of multiple users?
Can anyone help me on this please?

Thank you in advance,
Steve


#2

Create a collection /array as a variable. Using Spin JSON array works well. And then use that variable as the collection in the multi instance config.

See Pattern Review: DMN Looping for Array Input for example of using Json array as the collection.


#3

When you say collection/array you mean the multiple users (Representatives in my example)?
How can Spin JSON array work well for a big number of multiple users?
For instance, if you want to assign a Multi-Instance Task to 3 users, it’s relatively simple:

var names = S(JSON.stringify({"names":["chris","steve","frank"]}));
execution.setVariable('assignees', names);

But how can I configure the above SPIN json array/collection if I have 30 usernames instead of 3?

Thank you,
Steve


#4

For you what is the difference between 3 and 30 usernames? 30 is not a large list. If you fellow the multi instance setup shown in the link above you will end up with a user task assigned to each user in the list.