cancel
Showing results for 
Search instead for 
Did you mean: 

Exclusive gateway behaviour during JVM crash

lakmg
Champ in-the-making
Champ in-the-making
Hi,

I have an application which uses activiti, my model is as below:

user Task –>service Task—>exclusiveGwy–>serviceTask–>UserTask—

I would like to know the state of ACT_ID_ for the following scenario:
  when my application is at exclusiveGwy, if the JVM crashes, what will be stored in the column ACT_ID_ of activitiDB table ACT_RU_EXECUTION?

This is required, so that I can proceed from the current state once the JVM comes back

Please let me know if any other details are required.

Thanks,
Lakshmi
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
When your JVM craches when the process was running (eg. currently in the gateway-step) the DB-transaction that was active will NOT be committed. When the engine boots again, the process state will be the same as before the API-call (in your case, the usertaks you completed during the crash, will still be there uncompleted).

All acitviti-related process-logic is rolled back, together with all of your DB-mutations, if these participate in the same transaction.

lakmg
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the quick reply.

One more confirmation needed is:
If at servicetask JVM crashes, even for this it goes back to userTask, is my understanding correct?

Thanks,
Lakshmi

frederikherema1
Star Contributor
Star Contributor
Yes, that is correct. As long as the process doesn't reach a wait-state, async task or process-end, the transaction is not committed. So if JVM crashes (or an exception is thrown) in one of your steps between the two userTasks, it's rolled back to the state it was before, waiting in userTask1.