Implementation of the Create Order Saga Execution Coordinator

Understand how to implement the order creation operation in the Order Processing module using an orchestrated saga.

Creating an order in the Order Processing module is triggered by the BasketCheckOut event. We can continue to do that in Order Processing. In this lesson, we will be implementing the saga in a new module called cosec that will be reactive to the OrderCreated event from the Order Processing module.

Why not trigger the saga off the BasketCheckedOut event?
We could have and it would work mostly the same with maybe an additional step or alternate action or two. We will leave reimplementing the saga that way as an exercise for you.

Registering all the external types

The saga will be sending commands and receiving replies from a handful of modules. So, in the composition root in the Driven adapters section, after the registry has been created, we have the following:

Get hands-on with 1400+ tech skills courses.