cancel
Showing results for 
Search instead for 
Did you mean: 

how to create candidate user group dynamically

hemamalini
Champ in-the-making
Champ in-the-making
HI, in my workflow, there are three fields(user names) to get the user name to which task should be assigned. I framed the service task to gather the list of names and assigned the assigneeList to the process variable. Now when i give ${assigneeList} as candidate group for the next user task, work is not assigned to the user's queue. If i use Multiinstance, it requires all to approve. But in my case any one can approve. They dont belong to any group.How can i achieve this?
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Hema,

Consider to use completitionCondition.
http://www.activiti.org/userguide/#bpmnMultiInstance


<userTask id="miTasks" name="My Task" activiti:assignee="${assignee}">
  <multiInstanceLoopCharacteristics isSequential="false"
     activiti:collection="assigneeList" activiti:elementVariable="assignee" >
    <completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</completionCondition>
  </multiInstanceLoopCharacteristics>
</userTask>

Regards
Martin

penusila611621
Champ in-the-making
Champ in-the-making
You should use candidateUsers instead candidateGroups. Then no need to use multi instance concept as well.

hemamalini
Champ in-the-making
Champ in-the-making
Hi after completion condition i am able to achieve the desired result. Did you mean to use directly the process variables directly in candidate users in comma separated right without multiinstance ?