I am trying to implement a strategy for switching to another resource while executing jbpm6 processes. My setup is this:
- I am using jbpm6.2.0-Final (latest stable version) with support enabled.
- I create an instance of
org.kie.spring.factorybeans.RuntimeManagerFactoryBean with type SINGLETON to get KSession to start / stop processes and terminate / abort work items - all beans are connected to Spring 3.2
- DB2 uses a database engine
- I am using Tomcat 7.0.27
In a positive scenario, everything works as I expect. But I would like to know how to resume the process in case of server failure. To reproduce it, I started my process (described as a BPMN2 file), got to some middle step and killed the Tomcat process. After that, I see an incomplete process instance in the PROCESS_INSTANCE_INFO table and an incomplete work item in the WORK_ITEM_INFO table. There is also a session in the SESSION_INFO table.
My question is: could you show me an example of code that will take this remaining process and resume it starting from the last node (if possible).
Update I forgot to mention that I do not use the jbpm console, but I embed jbpm in my javaee application.
source share