cancel
Showing results for 
Search instead for 
Did you mean: 

How to control Task Listeners events when task is rolled back.

swamy2156
Champ on-the-rise
Champ on-the-rise
Hi,

I have a simple workflow with 2 user tasks(synchronous) with task listener for all types of events(create, assignment, complete). When I am completing userTask1(UT1), userTask2(UT2) will be created and two events will be triggered - UT1 complete & UT2create . When there is some exception occurs during UT2 creation, transaction will be rollback and UT1 will be active but 2 task listener events are already triggered. These events misleading customers in real time( Production ).

Is there a way to control those events when transaction rollback? Any ideas?


Thanks,
Swamy.



1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi Swamy,

When you would have a service task in between the user tasks, the logic in the service would also be executed before a possible rollback of the transaction. The logic that is executed needs to be part of the transaction, so a rollback would also mean a rollback of that logic. If that's not possible for some reason, you would need compensation logic.

Best regards,