cancel
Showing results for 
Search instead for 
Did you mean: 

How to verify user task assignment at runtime?

raj1
Champ in-the-making
Champ in-the-making
I have a Business Process with two user tasks ut1 and ut2 namely. Both usertasks have same candidate group Management. After deploying the process, at runtime, the requirement is to ensure that usertasks ut1 and ut2 are preformed by different users in the Candidate groups Management. For e.g.  if Kermit performs the task ut1, he(Kermit) cannot claim & perform the task ut2 and also ut2 has to be claimed & performed by another user in Candidate group Management.

To achieve this:

I will have to create Task listener for the user task ut2 on the event "assignment", then in the task listener get history of the usertask ut1 and check if the user assigned for task ut2 and the user performed the task ut1 are same.

If they are same then mark the task ut2 as unassigned.

Is this the correct approach?

Please guide me as how to go about and achieve this requirement?
21 REPLIES 21

raki1497
Champ in-the-making
Champ in-the-making

I didnt understand from the above ... i wonder that how to write java code in this activiti 6 application . My application looks like this alfresco activiti 6 

in this where can i code java classes , how to debug , pass the variable , how maven helps in this app designer. 

Please help me ..... out .. In referring to above application designer point

mdtabrezmca
Star Contributor
Star Contributor

If you are running activiti 6 from source code then you need to make one seperate jar as mentioned in this turotial Activiti Enterprise Developer Series - Process and Task Listeners  and put it in class path or lib folder. there is no provision in activiti to write java code.I hope this is clear now