[jboss-user] [jBPM] - Re: Restore JBPM session

suprit chaudhary do-not-reply at jboss.com
Mon Aug 13 05:27:56 EDT 2012


suprit chaudhary [https://community.jboss.org/people/supritchaudhary] created the discussion

"Re: Restore JBPM session"

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

--------------------------------------------------------------
Hi new bee,

JBPM do not provide automatic restore of process and session on server restart :-(
You have write your own management code for this service.
You will need to read process id of pending complete workItem and restart the process yourself.
Never process can only be started once. If process was in progress when server restarted then you can not start process again.
Yo can find out the last workItem and complete it by this code
*ksession.getWorkItemManager().completeWorkItem(workItemId, null);*
Once the workItem is complete the flow will process to next workItem.

Study this to restore session:

 /eclipse-javadoc:☂=MorphoCSBPMWS/D:\/JBMPWorkspace\/MorphoCSBPMWS\/WebRoot\/WEB-INF\/lib\/knowledge-api-5.4.0.Final.jar<org.drools.persistence.jpa(JPAKnowledgeService.class☃JPAKnowledgeService~loadStatefulKnowledgeSession~I~Lorg.drools.KnowledgeBase;~Lorg.drools.runtime.KnowledgeSessionConfiguration;~Lorg.drools.runtime.Environment;☂StatefulKnowledgeSession StatefulKnowledgeSession org.drools.persistence.jpa. /eclipse-javadoc:☂=MorphoCSBPMWS/D:\/JBMPWorkspace\/MorphoCSBPMWS\/WebRoot\/WEB-INF\/lib\/knowledge-api-5.4.0.Final.jar<org.drools.persistence.jpa(JPAKnowledgeService.class☃JPAKnowledgeService JPAKnowledgeService.loadStatefulKnowledgeSession(int id,  /eclipse-javadoc:☂=MorphoCSBPMWS/D:\/JBMPWorkspace\/MorphoCSBPMWS\/WebRoot\/WEB-INF\/lib\/knowledge-api-5.4.0.Final.jar<org.drools.persistence.jpa(JPAKnowledgeService.class☃JPAKnowledgeService~loadStatefulKnowledgeSession~I~Lorg.drools.KnowledgeBase;~Lorg.drools.runtime.KnowledgeSessionConfiguration;~Lorg.drools.runtime.Environment;☂KnowledgeBase KnowledgeBase kbase,  /eclipse-javadoc:☂=MorphoCSBPMWS/D:\/JBMPWorkspace\/MorphoCSBPMWS\/WebRoot\/WEB-INF\/lib\/knowledge-api-5.4.0.Final.jar<org.drools.persistence.jpa(JPAKnowledgeService.class☃JPAKnowledgeService~loadStatefulKnowledgeSession~I~Lorg.drools.KnowledgeBase;~Lorg.drools.runtime.KnowledgeSessionConfiguration;~Lorg.drools.runtime.Environment;☂KnowledgeSessionConfiguration KnowledgeSessionConfiguration configuration,  /eclipse-javadoc:☂=MorphoCSBPMWS/D:\/JBMPWorkspace\/MorphoCSBPMWS\/WebRoot\/WEB-INF\/lib\/knowledge-api-5.4.0.Final.jar<org.drools.persistence.jpa(JPAKnowledgeService.class☃JPAKnowledgeService~loadStatefulKnowledgeSession~I~Lorg.drools.KnowledgeBase;~Lorg.drools.runtime.KnowledgeSessionConfiguration;~Lorg.drools.runtime.Environment;☂Environment Environment environment)
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://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/20120813/e7a8a773/attachment-0001.html 


More information about the jboss-user mailing list