简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM