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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -