3 Replies Latest reply on Dec 9, 2005 8:43 AM by amiratalbi

    Please Help

    amiratalbi

      Hi,

      I made a processdef like this:
      <process-definition name="Processus qualité2"+
      <start-state name="start">
      transition name="To_analyse_transition' to='Task_byPM"
      </start-state>
      <task-node name="Task_byPM">



      and it's well deployed,
      then when i execute the code:
      ______________________
      JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession();
      //GraphSession graphSession = jbpmSession.getGraphSession();
      jbpmSession.beginTransaction();
      ProcessDefinition processDefinition = jbpmSession.getGraphSession().findLatestProcessDefinition(requestParam.getRequestType());
      ProcessInstance processInstance = new ProcessInstance(processDefinition);



      // ContextInstance: process variables :)
      ContextInstance contextInstance = processInstance.getContextInstance();
      contextInstance.setVariable("Commentaire de l'utilisateur final", requestParam.getComment());
      contextInstance.setVariable("ProjectManager", requestParam.getProjectManagerID());
      contextInstance.setVariable("Nom du projet", requestParam.getProjectName());
      contextInstance.setVariable("Type requête", requestParam.getRequestType());

      processInstance.signal("To_analyse_transition");


      jbpmSession .getGraphSession().saveProcessInstance(processInstance);
      jbpmSession.commitTransaction();
      jbpmSession.close();

      i have the following error :(
      java.lang.NullPointerException
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.instantiateNewTaskInstance(TaskMgmtInstance.java:177)
      org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:74)
      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.graph.exe.Token.signal(Token.java:104)
      org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:213)
      com.wpm.workflow.processSimulation.simulateProcess.moveProcess(simulateProcess.java:30)
      com.wpm.requestWorkflow.actions.SubmitRequestAction.execute(SubmitRequestAction.java:47)
      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.doPost(ActionServlet.java:525)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)



      please could you help me and tell me why the process doesn't leave the start state. thanks

      _________Sorry i didn't represent all processdefintion because i dont know when i make a preview of message the tags content doesn't appear

        • 1. Re: Please Help
          aguizar

          I'm assuming you're using jBPM 3.0.2. This exception gets thrown when you don't specify a task instance class. Add the following line to your jbpm.properties file:

          jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance



          • 2. Re: Please Help
            aguizar

            By the way, you can include tagged text in your posts by enclosing them in a code section, as follows:
            LbracketcodeRbracket<tagged-text ... />Lbracket/codeRbracket
            Replace Lbracket with a [ character and Rbracket with a ]

            • 3. Re: Please Help
              amiratalbi

              Thanks for your help
              ouf, es geht :)


              It's running now