Skip to main content

EventStorming

As built

Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.

Process-level boards in the ddd-crew EventStorming glossary & cheat sheet notation. Every sticky comes from model.yaml. The hotspots are genuine gaps or risks in the model; the inventory at the end says where each one comes from. The domain-wide board is EventStorming Big Picture.

Legend​

ColourStickyMeaning
Blue #a5d8ffCommandAn intent this context handles
Yellow #ffec99AggregateShippingLabel or PackageJourney
Orange #ffc078Domain EventA fact, this context's or a neighbour's
Lilac #d0bfffPolicy"Whenever X, then Y"
Green #b2f2bbRead ModelData a decision reads
Pink #fcc2d7External SystemA neighbour context or actor
Red #ff8787HotspotA gap or risk in the model

1. Label issue​

Derived from: model.yaml → contexts[shipping-and-tracking].aggregates[ShippingLabel], .aggregates[PackageJourney].commands, .sync_calls, .read_models, .publishes[LabelIssued]; contexts[linehaul-transportation].read_models, contexts[customer-ordering].read_models.

Omitted: the duplicate-label and ship-to-unavailable branches (see Use Cases); the outbox write.

1b. Label void​

Derived from: model.yaml → contexts[shipping-and-tracking].rest, .aggregates[ShippingLabel].transitions, .publishes[LabelVoided].

Omitted: nothing else; the model names no reaction to a void.

2. Timeline consolidation​

2a. Handover and the middle mile​

Derived from: model.yaml → contexts[shipping-and-tracking].consumes, .policies[HandoverOnFirstScan], .aggregates[PackageJourney], .publishes[PackageScanned, PackageHandedOver].

Omitted: the REST route POST /journeys/{trackingNumber}/scans (same command, caller not named); duplicate and out-of-order scans (stored, never applied, no event). Policy "each fact becomes one scan per tracking number" is the consumers' translation step, a proposed design element rather than a model policy.

2b. Last mile​

Derived from: model.yaml → contexts[shipping-and-tracking].consumes, .aggregates[PackageJourney].transitions, .publishes[PackageScanned, PackageDelivered].

Omitted: a failed attempt (back to AT_STATION, PackageScanned only).

3. Exceptions and terminal outcomes​

Derived from: model.yaml → contexts[shipping-and-tracking].policies[ExceptionOnSilence], .aggregates[PackageJourney].commands, .publishes[PackageExceptionRaised, PackageReturned, PackageLost]; contexts[delivery-promise].policies[RepromiseOnRisk]; contexts[last-mile-delivery].policies[RetryNextWave].

Omitted: ErrJourneyClosed on a closed journey. PackageReturned and PackageLost are integration events (delivery-promise consumes them).

Sticky inventory​

StickyKindModel source
IssueLabel, VoidLabelCommandaggregates[ShippingLabel].commands
StartJourney, RecordScan, RaiseException, ReturnToSender, DeclareLostCommandaggregates[PackageJourney].commands
ShippingLabel, PackageJourneyAggregateaggregates
LabelIssued, LabelVoided, PackageScanned, PackageHandedOver, PackageDelivered, PackageExceptionRaised, PackageReturned, PackageLostDomain Event (own)publishes
VendorShipmentConfirmed, LoadDeparted, LoadArrived, PackageOutForDelivery, DeliveryAttemptedDomain Event (neighbour)consumes
HandoverOnFirstScan, ExceptionOnSilencePolicypolicies
RepromiseOnRisk, RetryNextWavePolicy (neighbour, on pink stickies)delivery-promise, last-mile-delivery policies
CatalogDimensionsViewRead Modelread_models
vendor-connectivity, customer-ordering, linehaul-transportation, last-mile-delivery, delivery-promise, order-sourcing, node-performanceExternal Systeminbound, publishes[].consumers, sync_calls

Hotspots and where they come from​

HotspotBoardSource in model.yaml
Request fields of IssueLabel; no orderId reaches this context by event1sync_calls[GetShipTo] needs orderId; publishes[PackageDelivered].data has orderId; publishes[LabelIssued].data and vendor-connectivity publishes[PurchaseOrderIssued].data have none
Printable label not modelled1vendor-connectivity po.Label is labelRef + trackingNumber + carrier; no route here renders a label
StartJourney has no trigger1aggregates[PackageJourney].commands lists it; no policy, route or event starts it
VoidLabel caller1brest has POST /labels/{labelRef}/voids; no inbound row. Resolved (ADR 0002 A13): the void closes a LABELLED journey as VOIDED
Resolved (G3): node types2aLoadArrived carries nodeType; policy ScanTypeFromLoadFacts
Resolved (G3): HANDED_OVER -> AT_STATION2blane_rules.allowed has FULFILLMENT_CENTER -> DELIVERY_STATION; PackageJourney.transitions now has the edge (direct injection)
Resolved (G3): departure kind; VendorShipmentConfirmed is an applied SHIPMENT_CONFIRMED scan with no state change2apolicies[HandoverOnFirstScan] reads departureKind PICKUP from LoadDeparted; ADR 0002 A5
Expected leg time and tolerance3policies[ExceptionOnSilence]; consumes has no departure, lane or wave event
Resolved: triggers of ReturnToSender and DeclareLost3ADR 0002 A8: PackageReturnInitiated from last-mile-delivery; the silence sweep declares an IN_TRANSIT journey lost 48 h after an unanswered NO_SCAN