1 Reply Latest reply on Dec 31, 2006 6:40 AM by Ronald van Kuijk

    Simple process not ending.

    Sergio Ramos Newbie

      I execute my business process using the following code:


      GraphSession graphSession = jbpmContext.getGraphSession();
      log.debug("Finding process definition: MyProcess");
      ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("MyProcess");
      log.debug("Creating new process instance: MyProcess");
      ProcessInstance processInstance = new ProcessInstance(processDefinition);
      log.debug("Saving process instance: MyProcess");
      og.debug("Executing business process: MyProcess");
      log.debug("Is process ended? " + processInstance.hasEnded());
      log.debug("Saving process instance: MyProcess");
      String status = (String) processInstance.getContextInstance().getVariable(PVAR_engineStatus);
      log.info("return=" + status);

      My code here and the code in the node action in my business process execute successfully, without any errors. However, the problem is that the process shows that it has not ended -- the processInstance.hasEnded() method returns false, and the process instance saved to the database also shows that the process has not yet ended. Again, there are no wait states in this business process, and there are transitions from start to my node to the end. Why isn't my business process showing that it has ended?

      thank you