cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction handler in Activiti Engine

ryu
Champ in-the-making
Champ in-the-making
Hi,

I have a small question about how Activiti handles long transaction in the following case:
The process enters a userTask and it waits for an action from the user. The question is:

(1) Are the current process variables committed into the database automatically (for long running transaction and data stability purpose) or we have to do it manually?
(2) Do the transaction of the process last as long as the process ends? meaning all database changes of the process engine will be committed, only when the process ends. (I just want to confirm this)

Thank you very much as always. Activiti is cool!
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
When the process reaches a wait-state (eg. userTask) the process-variables and execution-state are stored in the DB and the DB-transaction is commited. When the user eventually completes the task, a new transaction is started and the process flows on in that transaction untill the next wait-state or process-end.

So the transaction doesn't run over the whole process if the process contains waitstates (or in the furture, asynchronous continuations).

Hope this makes sense
Cheers,