[jboss-user] [JBoss jBPM] - Re: Failure when ending process

john.rojas do-not-reply at jboss.com
Sun Oct 15 23:53:08 EDT 2006


I removed the exception as follows:

I redesigned the process definition so that the end-transition takes place from the wait state. This is the new shutdown procedure:
1. The decision node suspends the timer
2. The decision node sets the context variable
3. The decision node always moves back to the wait state

4. The ProcessManager detects the variable has been set
5. The ProcessManager asserts the process is in the Wait State
6. The ProcessManager signals("end-transition")

7. The process ends (without any exceptions).

I don't know why the original version threw an exception. I am just glad this is working.

Image of new process definition:
http://tinypic.com/view/?pic=4dg12k3

[img]http://i10.tinypic.com/4dg12k3.jpg[/img]

HERE IS THE UPDATED CODE IN endProcess(...):


  |       // At this point the process should be in the wait state
  |       assertEquals( "Instance is wait state", processInstance.getRootToken().getNode().getName(), "Wait For Start Time");
  | 
  |       // Signal the process to end
  |       processInstance.signal( "end-transition" );
  | 
  |       assertEquals( "Instance is end state", processInstance.getRootToken().getNode().getName(), "end");
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978431#3978431

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978431



More information about the jboss-user mailing list