JBoss Community

How to resume a persisted processInstance?

created by Ryan Peterson in jBPM - View the full discussion

Hey guys,

 

I'm starting my ProcessInstance which consists of two service tasks seperated by a timer. 

 

If I Thread.sleep() after creating my StatefulKnowledgeSession before calling ksession.dispose(), then the timer can complete and my 2nd task executes.

 

If I call ksession.dispose() without sleeping, and re-load my ksession via JPAKnowledgeService.loadStatefulKnowledgeSession(w, x, y, z), my processInstance gets stuck on the timer even though more time has elapsed than it's limit.  Is there a method I need to call in order to get my processInstance to continue executing upon checking the timer status?

 

Ideally I'd like to be able to create and start my processInstance, then close out the ksession.  Then periodically check on the status of the ksession to see if the timer's value has elapsed, and if so continue executing nodes.

 

Thanks for any suggestions/help!

Reply to this message by going to Community

Start a new discussion in jBPM at Community