Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBPM6: How to resume a process from the last successful node after the server crash?

I'm trying to implement the failover strategy when executing jbpm6 processes. My setup is the following:

  • I'm using jbpm6.2.0-Final (latest stable release) with persistence enabled
  • I'm constructing an instance of org.kie.spring.factorybeans.RuntimeManagerFactoryBean with type SINGLETON to get KSession to start/abort processes and complete/abort work items
  • all beans are wired by Spring 3.2
  • DB2 is used a database engine
  • I use Tomcat 7.0.27

In the positive scenario everything is working as I expect. But I would like to know how to resume the process in the case of server crash. To reproduce it I started my process (described as BPMN2 file), got at some middle step and killed the Tomcat process. After that I see uncompleted process instance in the PROCESS_INSTANCE_INFO table and uncompleted work item in the WORK_ITEM_INFO table. Also there is a session in the SESSION_INFO table.

My question is: could you show me the example of code which would take that remaining process and resume it starting from the last node (if it is possible).

Update I forgot to mention that i'm not using jbpm-console, but I'm embedding jbpm into my javaee application.

like image 585
Oleg Avatar asked Apr 01 '15 15:04

Oleg


1 Answers

If you initialize your RuntimeManager on init of your application Server it should take care of reloading and resuming the processes. You need not worry about reloading it again by yourself.

like image 121
Kalpak Pingle Avatar answered Oct 01 '22 06:10

Kalpak Pingle