[jboss-user] [jBPM] - Re: How to finish the processInstance

Kris Verlaenen do-not-reply at jboss.com
Mon Jul 4 11:01:47 EDT 2011


Kris Verlaenen [http://community.jboss.org/people/KrisVerlaenen] created the discussion

"Re: How to finish the processInstance"

To view the discussion, visit: http://community.jboss.org/message/613297#613297

--------------------------------------------------------------
This all seems to be normal.
Why do you think that the processInstance is still active in this case?
If you do ksession.getProcessInstance(id) after completing the user task, do you get a process instance in state active? Or null?

Or are you looking at the processInstance variable in this case?  As the processInstance variable in your code is a snapshot of the state of the process instance after starting it.  Note that this process instance is disconnected, meaning that it will not update when the state of the process instance in the engine is updated.  To get an updated state, you need to do ksession.getProcessInstance(id) again.  In this case, this should return null, as the process instance has completed.

Kris
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/613297#613297]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110704/873dc0ab/attachment.html 


More information about the jboss-user mailing list