1 Reply Latest reply on Jul 30, 2007 9:03 AM by clause Mbacky

    can't finished my task

    clause Mbacky Newbie

      hi everybody.
      i don't know why i don't successfully finish my task.

      this is error:

      17:17:13,295 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.T
      askNode - this operation breaks ==
      17:17:13,374 WARN [RequestProcessor] Unhandled Exception thrown: class org.jbpm
      .JbpmException
      17:17:13,389 ERROR [[action]] Servlet.service() for servlet action threw excepti
      on
      org.jbpm.JbpmException: closed JbpmContext in different order then they were cre
      ated... check your try-finally's around JbpmContexts blocks
       at org.jbpm.JbpmConfiguration.popJbpmContext(JbpmConfiguration.java:555)
      
       at org.jbpm.JbpmConfiguration.jbpmContextClosed(JbpmConfiguration.java:5
      67)
       at org.jbpm.JbpmContext.close(JbpmContext.java:144)
       at com.WebApplicationWithJbpm.actions.SaveClose.performAction(SaveClose.
      java:89)
       at com.WebApplicationWithJbpm.actions.BaseAction.execute(BaseAction.java
      :17)
       at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
      tProcessor.java:431)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
      va:236)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
      6)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      
      


      And i execute this code:

      
      
      TaskInstance taskInstance=jbpmContext.getTaskMgmtSession().loadTaskInstance(taskBean.getTaskInstanceId());
      System.out.println("task name "+taskInstance.getName());
      System.out.println("start_date "+taskBean.getStart_date());
      System.out.println("duree "+taskBean.getDuree());

      taskInstance.getContextInstance().setVariable("start_date", taskBean.getStart_date());
      taskInstance.getContextInstance().setVariable("duree", taskBean.getDuree());
      taskInstance.end();


        • 1. Re: can't finished my task
          clause Mbacky Newbie

          i am working for find this issue.
          i think problem is on the connection with the database or the deployment.

          this is my process:

          
          <?xml version="1.0" encoding="UTF-8"?>
          
          <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="holiday-request">
          
          
           <swimlane name="participant">
           <assignment expression="user(ernie)"></assignment>
           </swimlane>
          
           <swimlane name="rh">
           <assignment expression="user(martin)"></assignment>
           </swimlane>
          
          
           <start-state name="enter request">
           <task name="request entry">
           <assignment class="ErnieAssignment"></assignment>
           <controller>
           <variable access="read,write" name="start_date"></variable>
           <variable access="read,write" name="duree"></variable>
           </controller>
           </task>
           <transition to="evaluate request"></transition>
           </start-state>
          
          
           <task-node name="evaluate request">
           <task name="request evaluation" duedate="">
           <assignment class="MartinAssignment"></assignment>
           <controller>
           <variable access="read" name="start date"></variable>
           <variable access="read" name="duree"></variable>
           <variable access="read" name="info"></variable>
           <variable access="read,write" name="decision"></variable>
           </controller>
           </task>
           <transition to="give additionnal info" name="more info needed"></transition>
           <transition to="end" name="approve/disapprove"></transition>
           </task-node>
          
           <task-node name="give additionnal info">
           <task name="additional info entry">
           <assignment class="ErnieAssignment"></assignment>
           <controller>
           <variable access="read" name="start date"></variable>
           <variable access="read" name="duree"></variable>
           <variable access="read,write" name="info"></variable>
           </controller>
           </task>
           <transition to="evaluate request"></transition>
           </task-node>
          
          
           <end-state name="end"></end-state>
          
          
          </process-definition>
          


          And i have same error when i want use
          processInstance.signal()


          like this:
          ProcessDefinition processDefinition=graphSession.getProcessDefinition(2);
          
           //creation d'une nouvelle instance de processus dans la base
           ProcessInstance processInstance=new ProcessInstance(processDefinition);
           Token token=processInstance.getRootToken();
           token.signal();
          
           //creation d'une nouvelle instance de tache pour l'étape initiale
           TaskInstance taskInstance=processInstance.getTaskMgmtInstance().createStartTaskInstance();
           taskBean.setTaskInstanceId(taskInstance.getId());
          
          


          i dont know why .....