Package-level declarations
Types
A buyer's basket, one per buyer: its id is the buyer's user id (AggregateIdSource.OWNER). The buyer addresses it by no id, as "mine", and the first item creates it; Wow forbids a buyer another buyer's basket, and only a caller with no owner, such as a saga or a service, names the basket by its id.
Submits a checked-out basket to the ordering context as an order, the classic eShop's checkout, synchronously: the checkout is done only once the ordering context has the order, so the saga calls the ordering service's command gateway (wow.peers.eshop-ordering.url) instead of sending to its command topic, the default for the rest of the shop. The call names no order id: the ordering numbers the order it creates (SO-261031-42, its order numbers' generator), and the call's request id comes from the basket's commit, so handling the commit again, after a retry or a replay, is the same request: the ordering context decides it once and answers with the same order and number, without taking another.
The state of a Basket, changed in place by its events: its items, one line per product, and how many times it was checked out. Every property has a value before the first event.