AssignmentHandler for groups
gwittwer Nov 14, 2005 1:02 PMHello
I'm working on the AssignmentHandler for my webapp.
I took the ExpressionAssignmentHandler from the jbpm.identity module and changed the resolveTerm stuff to my requirements.
If I use for e.g. the expression user(James Bond) the execution and assignment works great.
But if I use expression group(Agent) the assignment is null.
I added some log-information to the ExpressionHandler:
18:57:24,779 DEBUG [TaskBean] Save and Close button pushed 18:57:24,781 DEBUG [GraphElement] event 'task-end' on 'Task(Pflichtenheft erstellen)' for 'Token(/)' 18:57:24,815 DEBUG [TaskInstance] completion of task 'Pflichtenheft erstellen' results in taking the default transition 18:57:24,825 DEBUG [GraphElement] event 'before-signal' on 'TaskNode(Pflichtenheft erstellen)' for 'Token(/)' 18:57:24,826 DEBUG [GraphElement] event 'node-leave' on 'TaskNode(Pflichtenheft erstellen)' for 'Token(/)' 18:57:24,827 DEBUG [GraphElement] event 'transition' on 'Transition(d6ea97)' for 'Token(/)' 18:57:24,829 DEBUG [GraphElement] event 'node-enter' on 'TaskNode(Pflichtenheft Abnahme)' for 'Token(/)' 18:57:24,865 DEBUG [ExpressionAssignmentHandler] assign called 18:57:24,866 DEBUG [ExpressionAssignmentHandler] resolving first term 'group(Agent)' 18:57:24,867 DEBUG [ExpressionAssignmentHandler] assignment groupName: Agent 18:57:24,867 DEBUG [ExpressionAssignmentHandler] get group by name: Projektbeteiligten 18:57:24,879 DEBUG [ExpressionAssignmentHandler] assignment entityname: Agent 18:57:24,880 DEBUG [ExpressionAssignmentHandler] entity is type of group: Agent 18:57:24,881 DEBUG [GraphElement] event 'task-assign' on 'Task(Pflichtenheft Abnahme)' for 'Token(/)' 18:57:24,884 DEBUG [GraphElement] event 'task-create' on 'Task(Pflichtenheft Abnahme)' for 'Token(/)' 18:57:24,884 DEBUG [GraphElement] event 'after-signal' on 'TaskNode(Pflichtenheft erstellen)' for 'Token(/)' 18:57:24,885 DEBUG [TaskBean] assignmentlogs: [task-assign[null,org.jbpm.taskmgmt.exe.TaskInstance@6991d8]]
The group and all members exists and could be resolved.
Just the assignment for the pooledActors doesn't work.
Code section in AssignmentHandler:
} else if (entity instanceof Group) { // put the group in the pool log.debug("entity is type of group: " + entity.getName()); assignable.setPooledActors(new String[]{entity.getName()}); //assignable.setActorId(Long.toString(entity.getId())); }
Why doesn't it work??
Thank you for your help. I searched the forum and found different posts, but none helped me.
Regards Gerhard