cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic number of user tasks with accept/reject features

chimu
Champ in-the-making
Champ in-the-making
We have a workflow requirement in which we have dynamic number of Roles(approvers) based on client location where we deploy this app,  so we defined a User Task as a multi-instance so that we can run a loop for number of approvers(configured at deployment time).  Lets say for a given workflow we dynamically defined 4 levels of approvals(serially) in the order below

Role_1 –> Role_2 –> Role_3 –> Role_4

So our multi-instance task will run a for-loop 4 times, I have some questions below

Q1) If any one approver(other than Role_1) Rejects then control should go back to previous Approver for data correction and re-approval and continue further in  same sequence defined above. Does multi-instance task supports this functionality ??. If not then what are the workarounds ??


Q2) If any user under Role_2 is working on task and he is also a member of Role_3 then we want Activiti to skip the Role_3 and and jump to Role_4. And if he is  also a member of Role_4 then that should be skipped too. Is that doable using multi-instance tasks and/or using some workarounds.
1 REPLY 1

trademak
Star Contributor
Star Contributor
Multi instance is really nothing more than a for-each loop. So no you won't get this functionality out-of-the-box. From your description I think it would be better to have a user task and based on some conditions loop back to this user task. Then you are building your own multi instance task and you can control the logic yourself using a Java service task or a script task.

Best regards,