cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign a UserTask to a Group based on the user?

zlatan316
Champ on-the-rise
Champ on-the-rise
Currently I have a User Task with Candidate users as [admin,user] and Candidate groups as [admingroup,usergroup].

How do I set the Task so that if an admin starts a process which uses a UserTask, it only goes into the 'admingroup', and if a user starts a process, it only goes into the 'usergroup'?

With Regards,
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Evaluate candidate group in serviceTask (scriptTask). This evaluation can be based on process instance initiator (http://www.activiti.org/userguide/#bpmnStartEvents)

Regards
Martin

zlatan316
Champ on-the-rise
Champ on-the-rise
Thanks Martin, I achieved it by then removing the visible groups each user sees when logged on.

jbarrez
Star Contributor
Star Contributor
No, Activiti doesn't know anything about 'active' or 'inactive'. That is logic you'll have to add yourself.