JBoss Community

Re: Restore JBPM session

created by suprit chaudhary in jBPM - View the full discussion

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:

 

StatefulKnowledgeSession org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(int id, KnowledgeBase kbase, KnowledgeSessionConfiguration configuration, Environment environment)

Reply to this message by going to Community

Start a new discussion in jBPM at Community