I dont understand how to store my registres if i used a SAGA and I saw a example about SQLPersistence.
I have a two databases (?)
MyDBSaga (only persist the saga)
MyDB (storage of my data, tables, sp, views, functions, etc.)
Method CreateBooking Call a endpoint to booking //Process in other endpoint Save booking entity in MyDBSaga or in MyDB? <--- return to IBookingCreated (only id or all entity) Method IBookingCreated Call endpoint to generate a sale //Process in other endpoint Save sale entity in MyDBSaga or in MyDB? <--- return to ISaleCreated (only id or all entity) Method ISaleCreated Call endpoint to save all entities (Booking and Sale)? MarkAsComplete();
Ass the saga pattern works, I do not fully understand how guarantee and use distributed transactions.
For example, what to do in case the sale is not completed?