3 Replies Latest reply on Aug 6, 2007 4:03 AM by mailinator

    Task Assignement

    mailinator Novice

      Hi,

      i'm trying to assign a task to someome using swinlane and assignement handler.

      My process definition :
      <process-definition name=Acces>
      <swimlane name=RH>
      <assignment class=a.b.responsable.assignement.RhAssignementHandler config-type=constructor>


      <start-state name=Dem>
      <transition name=TDemRec to=SearchUti>
      </start-state>
      <task-node name=SearchUti>
      <task name=SearchUti>
      <assignment class=com.it.application.responsable.assignement.RhAssignementHandler config-type=constructor>

      <transition name=TSeaTyp to=STypeDem>
      </task-node>

      My assignement handler :

      public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception {
      TaskInstance task = executionContext.getTaskInstance();
      task.setActorId(responsable.getId());
      }

      My problem is that i have this exception :

      javax.servlet.ServletException: org.jbpm.graph.def.DelegationException
      org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)

      caused by :

      org.jbpm.graph.def.DelegationException
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:214)
      org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:199)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:154)
      org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
      org.jbpm.graph.def.Node.enter(Node.java:318)

      caused by :

      java.lang.NullPointerException
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:226)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:199)
      org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:199)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:154)
      org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
      org.jbpm.graph.def.Node.enter(Node.java:318)


      I don't understand what i'm doing wrong.

      Regards,

      O.M.