cancel
Showing results for 
Search instead for 
Did you mean: 

Data consistency in another database.

manas__
Champ in-the-making
Champ in-the-making
Hello,

Im new in Activiti and I still solve one problem. When I using classic BPMn process with some Service Task, and got an error, intern mechanism make rollback in the last persistence state. But my examle: Process is start, User Task, Service Task, Service Task, end. I completed User Task. In first Service Task i change some data in another MySQL database, create commit. In second Service Task i get some error. Activiti make rollback in User Task, but data in another MySQL database is in inconsistence state.

This problem is maybe solved in some easy way. For example via some aplication server transaction? (JBoss, GlassFish)..? Or some Activiti mechanism?

Thank you.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Every activiti operation is done in a transaction. If there is a failure it will rollback to the previous consistent state.

> In first Service Task i change some data in another MySQL database, create commit.

Why are you doing this? This is probably why it messes up the transactions.

manas__
Champ in-the-making
Champ in-the-making
Yes, Activiti works really fine. But I am using Activiti like a state machine and next "bussiness" data is saved in another database. Main point is have a constistent state between Activiti and another data source…

I hope that I correct describe the problem…  I'm looking for some solving in Transaction manager on aplication server.

Anyway thank you for your response.

Yep, a transactionmanager in combination with XA is the way to go