Domain Message Flow
Derived from model/model.yaml. The pricing service is built on develop (IQVO/pricing at 5a18326, checked 2026-10-27) and not deployed (no warehouse-infra entry). Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.
Following ddd-crew Domain Message Flow Modelling.
Four scenarios. Participants are contexts and actors. Every arrow is a
message from the model, prefixed cmd: (command), qry: (query) or evt:
(event). A Note names a command a context runs on itself. Kafka is drawn
as one participant. Event names are written entity.EventName; the full
type is com.retailnetwork.<tier>.<producer>.<entity>.<EventName> (see
Domain Events). REST path
parameters are written without braces. The storefront-wide flows follow from
the Context Map.
1. Merchandiser prices an item and schedules a sale
Derived from: model.yaml → contexts[pricing].inbound (merchandiser row),
.aggregates[ItemPrice].commands + .invariants,
.publishes[ItemPriceChanged]; contexts[product-discovery].read_models;
contexts[shopping-cart].read_models.
Omitted: the outbox write and relay (see
Sequence Diagrams); the
CancelSale variant, which republishes ItemPriceChanged with the
effective price back at list (this pack's reading; the model names no
distinct event).
2. A sale window starts: the boundary policy republishes the price
Derived from: model.yaml → contexts[pricing].policies[PublishEffectivePriceOnWindowBoundary],
.aggregates[ItemPrice].value_objects (SaleWindow), .publishes.
Omitted: the batch scan that finds the windows reaching a boundary, and the burst behaviour the throughput estimate warns about ("bursts on sale boundaries"). No aggregate state changes at a boundary: the windows are already stored; only the published effective price moves.
3. Checkout issues a binding price quote
Derived from: model.yaml → contexts[pricing].inbound (checkout rows),
.aggregates[PriceQuote] (commands, invariants, description),
.policies[QuoteTtl], .publishes[PriceQuoteIssued];
contexts[checkout].sync_calls (IssuePriceQuote), .invariants
(ErrPriceQuoteExpired).
Omitted: the request's exact field list, which the model does not name
(open question on the
canvas); ExpireQuote
runs on the clock and publishes nothing, so checkout enforces the TTL at
confirm with ErrPriceQuoteExpired and its own ExpireOnQuoteExpiry
policy. A changed total between cart and confirm is visible before confirm
— gap S2's answer.
4. The network discontinues an item
Derived from: model.yaml → contexts[pricing].consumes,
.policies[WithdrawOnDiscontinue], .publishes[ItemPriceWithdrawn],
.read_models[CatalogItemView]; network/model/model.yaml → contexts[offer-availability].publishes[CatalogItemDiscontinued].
Omitted: CatalogItemCreated, which feeds only the view; the inbox; and
product-discovery's independent consumption of the same
CatalogItemDiscontinued (its own conformist edge to the network). Pricing
learns of discontinuation from the network, not from a sibling storefront
context.