cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Custom Assignee using Activiti bpmn.xml file

pankajnegi
Champ in-the-making
Champ in-the-making
Hello Friends,

I have tried to assign custom assignee as according to http://activiti.org,

http://activiti.org/userguide/index.html#bpmnUserTaskAssignment

it is possible to delegate to custom assignment logic using a task listener on the create event:

=>I made below userTask in the xyz.bpmn.xml file

<userTask id="task1" name="My task" >
  <extensionElements>
    <activiti:taskListener event="create" class="org.activiti.MyAssignmentHandler" />
  </extensionElements>
</userTask>

=>and create a class

public class MyAssignmentHandler implements TaskListener {

  public void notify(DelegateTask delegateTask) {
    // Execute custom identity lookups here
   
    // and then for example call following methods:
    delegateTask.setAssignee("kermit");
    delegateTask.addCandidateUser("fozzie");
    delegateTask.addCandidateGroup("management");
    …
  }
 
}

and put the jar  of this class into the path tomcat/webapps/alfresco/WEB-INF/lib

but its not working , not even finding any log for it


can anyone please tell me how will it work , or if any other solution for the same



Thanks
Pankaj
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Have you tried setting a breakpoint on your TaskListener class to see whether or not your class is even being loaded and to attempt to determine if you have any logic errors or exceptions?

Jeff

pankajnegi
Champ in-the-making
Champ in-the-making
java code works well, and its solved