Elisabeth Müller [
http://community.jboss.org/people/muellere] created the discussion
"How to detect crashed process instance in jbpm 4.1 ?"
To view the discussion, visit:
http://community.jboss.org/message/630266#630266
--------------------------------------------------------------
We are using JBPM 4.1 and need to implement some kind of recovery logic to cope with the
problem of crashed process instances.
The application is a server application resposible to execute various workflows. We are
using the persistence layer which assures that process states are saved to the database.
In case the application crashes, e.g. because of a hardware failure we need to restart the
application and resume the various activities which have been in progress when the
application crashed.
Since there is no automatism available, a process instance of a workflow will recover in
its last saved state and will not continue until I trigger an appropriate transistion.
So far so good. My problem is no the following:
I need to find the crashed activities of process instances.
My current idea is:
* check all process instances which are not suspended or ended
* check whether type of last activity is state or task
* if this is not the case check whether activity is currently locked by another jbpm
instance
But how to do this. Will the method "isActive" work also in case the activity
was locked before by the jbpm instance which crashed ? How is the optimistic locking
implemented ? Does this work similar to "selectForUpdate" in the database and
disappears when the instance has crashed ?
Hopefully anyone can help,
Elisabeth
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/630266#630266]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]