1 Reply Latest reply on Mar 16, 2006 3:27 PM by Ronald van Kuijk

    delegation exception

    Vishwanath Gorthi Newbie

      Hi all,
      I have recently started using Jbpm. I am integrating struts with jbpm.
      My processdefinition.xml looks like this:

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition name="eAODemo">








      <start-state name="start">



      >



      </start-state>
      <task-node name="task1">





      </task-node>
      <task-node name="task2">


      </task-node>
      <end-state name="end1" />
      </process-definition>

      I get an error on taskinstance.end() in the following code:

      jbpmSession=sessionFactory.openJbpmSession();
      jbpmSession.beginTransaction();
      Map taskParamMap = new HashMap();

      taskParamMap.put("protocolId", new Integer(protocolId));
      taskParamMap.put("requisitionId", new Integer(requisitionId));

      TaskInstance taskInstance = jbpmSession.getTaskMgmtSession().loadTaskInstance(taskInstanceId);

      Task task = taskInstance.getTask();
      System.out.println("00000000000 taskInstance.getTask() 00000000000"+taskInstance.getTask().toString());

      //TaskController taskController = taskInstance.getTask().getTaskController();
      TaskController taskController = task.getTaskController();

      System.out.println("99999999 taskController 99999999999999999"+taskController.toString());
      taskController.submitParameters(taskParamMap, taskInstance);
      jbpmSession.getGraphSession().saveProcessInstance(taskInstance.getTaskMgmtInstance().getProcessInstance());


      jbpmSession.commitTransaction();
      jbpmSession.close();
      }

      public void close(long taskInstanceId)
      {
      jbpmSession=sessionFactory.openJbpmSession();
      jbpmSession.beginTransaction();

      TaskInstance taskInstance = jbpmSession.getTaskMgmtSession().loadTaskInstance(taskInstanceId);
      taskInstance.end();
      jbpmSession.getGraphSession().saveProcessInstance(taskInstance.getTaskMgmtInstance().getProcessInstance());
      jbpmSession.commitTransaction();
      jbpmSession.close();
      }





      HTTP Status 500 -

      --------------------------------------------------------------------------------

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException
      org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


      root cause

      org.jbpm.graph.def.DelegationException
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.invokeAssignmentHandler(TaskMgmtInstance.java:149)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.getInitializedSwimlaneInstance(TaskMgmtInstance.java:131)
      org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:131)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:102)
      org.jbpm.graph.node.TaskNode.execute(TaskNode.java:136)
      org.jbpm.graph.def.Node.enter(Node.java:284)
      org.jbpm.graph.def.Transition.take(Transition.java:92)
      org.jbpm.graph.def.Node.leave(Node.java:349)
      org.jbpm.graph.node.StartState.leave(StartState.java:73)
      org.jbpm.graph.exe.Token.signal(Token.java:127)
      org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:354)
      org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:302)
      com.eao.jbpm.JbpmTest.close(JbpmTest.java:299)
      com.eao.jbpm.JbpmTest.saveAndClose(JbpmTest.java:290)
      com.eao.actions.SubmitRequisition.execute(SubmitRequisition.java:53)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


      note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


      --------------------------------------------------------------------------------

      Apache Tomcat/5.5.9


      Plz help,
      Thanks in advance!