Package-level declarations

Types

Link copied to clipboard
@Summary(value = "Commit an order's reservation")
data class CommitReservation(val orderId: String)

Takes the units reserved for the order orderId out of stock for good, once the order is shipped.

Link copied to clipboard
@Summary(value = "Receive stock")
data class ReceiveStock(val quantity: Int)

Takes quantity units of the product into stock, creating its stock on the first delivery.

Link copied to clipboard
@Summary(value = "Release an order's reservation")
data class ReleaseReservation(val orderId: String)

Makes the units reserved for the order orderId available again, once the order is cancelled.

Link copied to clipboard
@Summary(value = "An order's reservation was committed")
data class ReservationCommitted(val orderId: String, val quantity: Int)
Link copied to clipboard
@Summary(value = "An order's reservation was released")
data class ReservationReleased(val orderId: String, val quantity: Int)
Link copied to clipboard
@Summary(value = "Reserve stock for an order")
data class ReserveStock(val orderId: String, val quantity: Int)

Holds quantity units for the order orderId until the order is shipped or cancelled. The ordering context's order-process saga sends it for each product of an order awaiting validation. It is rejected when fewer units are available, and the rejection goes back to that saga, which cancels the order.

Link copied to clipboard
@Summary(value = "Stock was received")
data class StockReceived(val quantity: Int)
Link copied to clipboard
@Summary(value = "Stock was reserved for an order")
data class StockReserved(val orderId: String, val quantity: Int)

Units were reserved for an order. The ordering context learns of it from the receipt of its ReserveStock, not from this event.