cancel
Showing results for 
Search instead for 
Did you mean: 

Group as multiInstance parameter

irenailievska1
Champ in-the-making
Champ in-the-making
Hello,
I have a bit of a problem - I want to assign a task to a group and have (depending on the case) one or two users approve the task. I get the GROUP NAME in the workflow (I have a title of the document and depending on the title I decide the flow of the workflow).
I tried to add the group as a collection and use multiInstance, but it doesn't work.
Can someone point me in the right direction?

I use javascript in the process : this means that I wasn't able to have the group as a collection!
I am sending the authority name and this works fine when I insert this parameter as candidate groups [ activiti:candidateUsers="…."]. But then I would have to iterate the group members and kick the one that already approved. It doesn't seem like a nice solution.

How can I use a group name and say that from this group I need two people to approve? Perhaps in multiInstance?
I would appreciate any ideas.

Thank you in advance,
Irena
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
The group does need to be a java.util Collection for it to work. You can always try to have a listener before the step to create a new variable that is a collection and is used in the multi instance.
Alternatively, you can use an expression like ${someBean.makeGroupCollection} where this is a bean that creates a collection.