cancel
Showing results for 
Search instead for 
Did you mean: 

How the workflow recovery in case of the app failing work?

alper
Champ in-the-making
Champ in-the-making
I mean, if I have an application with the embedded Activiti Engine, and workflow running in it, and for some reason my application fails.
Will the workflow start running from the failing point when I re-run the application? How to test this behaviour? Will it run from the point where it failed before, or from some special points?

Thank you.
3 REPLIES 3

smirzai
Champ on-the-rise
Champ on-the-rise
Activiti saves the status in database when it comes to a wait state. Wait state can be human task, recieve task , asynchronous task and so on or when the process ends.
If for any reason, activiti cannot reach the next wait state, in the next run, it has no way to find out that. So it will start from the last wait sate.
These may cause some steps to be repeated.
If you need some kind of recovery, you have to make sure that BPMN exception is thrown and not java exception.
Then you can catch BPMN exception and forward to a recieve step. Later on, you can resume the process from the latest receive task by sending a signal to the process.

alper
Champ in-the-making
Champ in-the-making
Thank you very much, that was very helpful.
Is there any example of this mechanism realization? Honestly, I even don't know where to begin to implement this…

jbarrez
Star Contributor
Star Contributor
Beginning always starts with reading the docs: http://activiti.org/userguide/index.html#bpmnBoundaryErrorEvent