cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti + Spring + Transaction problem

holysoul
Champ in-the-making
Champ in-the-making
Hi guys.
I want to test the integration of Spring and Activiti, then I stuck with confusing problem. I have a workflow with 2 service task (using jpa repository saveAndFlush method to update database)  A and B
In the service A, I actively throw a new Exception , then the transaction rollbacks, and the flow stops. Well, it's okay.
<b>However, how can I rollback the service A only  and the flow continue to service B? </b>
Because if service A throws Exception, the flow will be stopped, and if Exception is caught ( then the flow continues), service A will not rollback.
I use JPA Repository to automatically handle transaction, so change to manual mode will take a lot of efforts now.

2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

may be you can run service A asynchronously (by default 3x retry to run service task) and flow can continue to task B.

Regards
Martin

holysoul
Champ in-the-making
Champ in-the-making
Yes, martin, I will try this, in some case it might be useful . Besides that, I think about catch BpmnException only to catch by ErrorBoundEvent.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.