Data rollback in service when the process is failed

My setup has 1 service that allows users to interact with UI where users can trigger start a process. Besides that, I have other client services implement several task handlers and they’re using different databases.

How can we do the transactional in the service when a process has failed? I would like to stop the failed process and roll back the data in the service that provides UI for the user.

Please see the flow in the image below:

Hi @shinnguyen0105,

you can use compensation events and -tasks to invoke the rollback and run the rollback explicitly:

Hope this helps, Ingo