AnsweredAssumed Answered

Modeling multiple user tasks in Activti

Question asked by bhaskar1 on May 1, 2012
Latest reply on May 1, 2012 by ronald.van.kuijk
Hello

We are trying to migrate from JBPM 3.2 to Activiti, having a trouble finding equivalent functionality of "task-node" in Activiti.

This is how it used to work in the old world :


<task-node name="Await QA">
      <task name="Persist To GIS">
         <assignment pooled-actors="QA" />
      </task>
      <task name="Apply Manually">
         <assignment pooled-actors="QA" />
      </task>
      <task name="Reject">
         <assignment pooled-actors="QA" />
      </task>

      <transition name="Persist To GIS" to="Await GIS Update Result" />
      <transition name="Apply Manually" to="Await Manual Application" />
      <transition name="Reject" to="Notify Reject" />
</task-node>

When flow of execution reaches the task node, we were able to find all the tasks assigned to current role(actor). And these tasks are mutually exclusive, the user can choose to perform one of the tasks and  the completion of task will transition to next state in the workflow.

We tried modeling this in activiti with user tasks but we couldn't get it working.

Option 1:
An  exclusive Gateway  with multiple user tasks,  but this returns only first task:
<code>
this.taskService.createTaskQuery().taskCandidateGroup("QA")
</code?

Option 2:
Parallel Gateway with multiple user tasks, this returns all the available tasks . But it creates multiple executions, and the process is waiting for all executions to finish

Outcomes