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]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to