[jboss-dev-forums] [Design of JBoss jBPM] - Simple process not ending.
brado
do-not-reply at jboss.com
Tue Jul 25 22:20:55 EDT 2006
Hello,
I am using jbpm 3.1.1. I have defined a very simple process that looks as follows:
start --> node --> end
There are no wait states. Now, from the jbpm user's guide, I see this quote:
"The idea is to start execution on process instances and that the execution continues till it enters a wait state."
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");
| jbpmContext.save(processInstance);
| og.debug("Executing business process: MyProcess");
| processInstance.signal();
| log.debug("Is process ended? " + processInstance.hasEnded());
| log.debug("Saving process instance: MyProcess");
| jbpmContext.save(processInstance);
| 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?
Thanks in advance.
Brad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960857#3960857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960857
More information about the jboss-dev-forums
mailing list