cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Atomicity Issue in Activiti

sakumar1
Champ in-the-making
Champ in-the-making
Activiti Version : 5.17
Transaction : XA Distributed Transaction
Application ORM : Hibernate

Work Flow Sequence : Service Task 1, Receive Task, Service Task 2, Boundary Timer Attached to the Process with Service Task 3 associated to it

Use  Case : 1. Service Task 1 Executed Successfully and  persisted Process Instance Variable, Waiting for receive of Notification to execute Receive Task
                  2. Notification Received, Application Started its own transaction before invoking Workflow and  execution of Service Task 2 got   failed with Application error. in Our Application Service Task we are catching issue. Hence Workflow Continued execution. However Finally Transaction Got Rolled Back, beccause Transaction object Set to Rollback.
                  3. After Time out Boundary timer kicked in and Service task 3 for boundary  timer failed to execute because of unable to get process instance variable.

Issue :  There is a Atomicity issue with Transaction where Activiti cleaned up  ACT_RU_VARIABLE, ACT_GE_BYTE_ARRAY even though Process didn't complete.

Questions :
1.  is Activiti using Seperate Tranction for Cleaning up ACT_RU_VARIABLE ?
2.  Is this is a known issue, for which fix is already available in latest build of Activiti ?

Regards,
Sakumar


2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Sakumar,

When and why is transaction object set to rollback? In that case exception is not caught from the activiti transaction manager point of view.
You should catch it earlier.

Regards
Martin

sakumar1
Champ in-the-making
Champ in-the-making
Hi Martin,

We have set rollback for run time exception in our code.

But we need to see here why Activiti using seperate transaction for Cleaning up  ACT_RU_VARIABLE, ACT_GE_BYTE_ARRAY.

It is resulting in partial rollback for Activiti Tables in case of Exception.

Regards,
Sakumar