Package-level declarations
Types
Moves a submitted order on to the stock validation; the order-process saga sends it.
Cancels an order that is not paid yet, for reason. The order-process saga sends it when the inventory cannot reserve a product, the payment context when its gateway declines the order's payment, and the order schedules it for itself when it is not paid within the payment grace period.
Confirms that the inventory reserved the order's units of productId. The stock-confirmation saga sends it for each reservation it reads from the inventory's stock stream; once every product is confirmed, the order awaits its payment.
The life of an order, after the classic eShop's: submitted, awaiting the stock validation, its stock confirmed (it then awaits its payment), paid and shipped; or cancelled before it is paid.
Submits an order of items. The basket context sends it when its buyer checks out, with the order's id fixed by the basket. The order belongs to the buyer: a saga's command carries the scope of the basket it is derived from, whose owner is its buyer, and the order takes its owner from the command that creates it. An order has items, each valid (OrderItem's constraints): the gateway checks that before the order decides.