6

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Oleg
  • 467
  • 1
  • 8
  • 17
  • Hi @Oleg, Have you gotten an answer to this? I'm looking for a similar solution. I posted here: https://developer.jboss.org/message/923746#923746 – T. Ujasiri Apr 06 '15 at 16:12
  • Hello @T. Ujasiri, unfortunately no answer yet, but I continue working on that. – Oleg Apr 06 '15 at 17:04
  • @Oleg The `jbpm6` documentation is lagging with examples and descriptions. I am also looking for an answer for similar questions. The document is so confusing also. – Dinoop paloli Apr 20 '15 at 07:32
  • 1
    Guys! Good news! :) I managed to restore the process with its state after crashing the tomcat process :) As soon as I have time I will post my solution here, I really hope 4 weeks I spent will save someone's time :) – Oleg Apr 20 '15 at 08:19
  • This may be useful. http://stackoverflow.com/questions/27303161/jbpm-6-1-cannot-resume-process. – Dinoop paloli Apr 20 '15 at 09:32
  • @Oleg Would it be possible to share your solution on how to resume a proecss after server crash? I'd like to know. Thanks! – LifeAndHope May 01 '15 at 20:55
  • It's very late, but I'm facing with problem as well. @Oleg, could you please share your knowledge and solution here with us. Thank you in advanced! – Farzad Sep 22 '21 at 22:53
  • Hello @Farzad! I am very sorry, but I am out of the context right now. If you have a github project somewhere I could try taking a look at it, but I can't promise anything, since it's been 6 years when I worked with jBPM last time :) – Oleg Sep 23 '21 at 15:10
  • Thank you @Oleg for your response. Actually, because of security reason, I can't share it with you. I was wondering you remember any clue in this regard to help me. My case regarding the resuming of the process has been stopped. I use RHPAM with spring boot. There is a process which has waiting nodes/components that cause committed data in the database as safe points. The JVM is lost for some reason during the process execution. In this scenario, how can I resume the process from the last safe point saved, when the JVM restarts (manually/automatically)? – Farzad Sep 23 '21 at 15:37
  • Hello guys, this solution looks good: - Finding not completed processes through the following endpoint: [POST] server/containers/{containerId}/processes/instances - Finding active node of the specific process via the below endpoint: [POST] server/admin/containers/{containerId}/processes/instances/{processInstanceId}/nodes/instances?activeOnly=true - Resuming the process from the node which find in the previous step: [POST] server/admin/containers/{containerId}/processes/instances/{processInstanceId}/nodes/{nodeId} Please let me know your thoughts on this. Thanks – Farzad Oct 06 '21 at 12:24

1 Answers1

1

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.