java - How clean up activity task candidates properly? -


it needed clean (modify) candidategroups , candidateusers in task listener:

@override public void notify(delegatetask delegatetask) {     delegateexecution execution = delegatetask.getexecution();         set<identitylink> candidates = delegatetask.getcandidates();         (identitylink candidate : candidates) {             // ???             delegatetask.deletecandidategroup(candidate.getgroupid());             delegatetask.deletecandidateuser(candidate.getuserid());         } } 

the question call? there 2 different methods deleting group , user. method candidate.gettype() can helpfull identifying usr or group, org.activiti.engine.task.identitylinktype has values:

public class identitylinktype {     public static final string assignee = "assignee";     public static final string candidate = "candidate";     public static final string owner = "owner";     public static final string starter = "starter";     public static final string participant = "participant"; } 

not sure understand trying achieve candidates "cleaned up" task completed. thing maintained in history task owner , assignee. candidates not collected in history.

that said, identity link types allow users participate in process in different ways (i.e. owners can delegate, assignees responsible doing task, candidate potential assignee must claim task , forth).

your code "clean up" candidates fine, once again, redundant once task claimed , completed.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -