AnsweredAssumed Answered

Dynamically Set Candidate Group in Task Listener

Question asked by lsharman on Jun 26, 2017
Latest reply on Jul 11, 2017 by ryandawson

Hi -

I'm using Activiti and want to dynamically set the Candidate Group for a task via the Create Task Listener. I'm using javascript in a task listener. I'm having two issues:


1) Setting the candidate group using a hard coded id works, but for portability, I need to set using a name. How do I get the group id from the group name in a Task Listener? The elements all seem to exist in the IdentityStore and GroupQuery, but I'm having issues putting it all together.


2) During development, I'm required to set an Assignee for this task. After setting the Candidate Group, how do I remove the assignee defined during the process definition? Currently, I'm setting the assignee to Candidate User Administrator since the Administrator won't be logging in, but I need to remove this assignment.


Also, is there documentation for scripting using javascript that might help me with other functionality?