i’m trying to implementing a microservices application based on CQRS, event sourcing using Axon v.4. In the application there is a long transaction so i’m trying to create a Saga with Axon but i don’t understand how axon manages with the rollback. For example this is my saga:
create a new order (insert a new instance in pending mode)-> create a new ticket (insert a new instance)-> check that the consumerId exists -> order approved.
What can i do if for example the consumerId doesn’t exist? i wish that the application rollback but i don’t understand how.
https://github.com/ElenaBernardi/eFood_Axon (this is the link of the application but i didn’t commit the saga yet )