[jboss-user] [jBPM] - Re: Processinstance not continue after restarting application.

Thomas Setiabudi do-not-reply at jboss.com
Fri Jan 25 01:03:41 EST 2013

Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: Processinstance not continue after restarting application."

To view the discussion, visit: https://community.jboss.org/message/794223#794223

Hi Tom Sebastian,

It was caused by the fact that after you restart the application there is no listener initialized to listen to the Task Complete Event sent by Human Task Service.
When you create new process instance, it will initialize this listener when it creates the Task, so thats why things works correctly after you trigger a new process instance.

If you embed the jbpm in your application then: 
you will need to re-initialize the session once your application start. 
If I remember correctly, there is a discussion in this forum that discuss about this, maybe that will help you.

If you use jbpm as a service (using jbpm-console REST Services), then:
I haven't tried this myself, but Maciej Swiderski suggest to create a servletContextListener that will initialize the session once the server is started.
this is the sample code
 https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/StatefulKnowledgeSessionUtilListener.java https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/StatefulKnowledgeSessionUtilListener.java

So we need to: 
1. Create a class like that, then fill in the code in contextInitialized() section to initialize the section.
If you use guvnor as process repository and have guvnor deployed in the same server as jbpm-gwt-console-server.war then maybe you need to put a delay before initializing the session
2. Package the class to a jar and put it inside jbpm-gwt-console-server.war inside the lib directory
3. Register a listener to the web.xml inside jbpm-gwt-console-server.war


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130125/00fb993d/attachment-0001.html 

More information about the jboss-user mailing list