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 EventStorming in the ddd-crew EventStorming glossary & cheat sheet notation. Every sticky comes from model.yaml. Hotspots are genuine open questions or risks in the model; the source of each is in the hotspot table. The network-wide board is on EventStorming big picture.

Legend​

ColourStickyHex
BlueCommand#a5d8ff
YellowAggregate#ffec99
OrangeDomain Event#ffc078
LilacPolicy#d0bfff
GreenRead Model#b2f2bb
PinkExternal System (a sibling context or an actor)#fcc2d7
RedHotspot#ff8787

1. Departures from lanes and vendor cutoffs​

Derived from: model.yaml → contexts[linehaul-transportation].policies[PickupFromCutoffs, HorizonRoll], .aggregates[LaneSchedule, Departure], .read_models, .inbound.

Omitted: ErrLaneClosed, ErrInvalidDepartureTimes and ErrOverlappingSlots refusals; consumers of DepartureScheduled (board 4).

2. Booking on lock​

Derived from: model.yaml → contexts[linehaul-transportation].policies[BookOnLock], .read_models[ExpectedVolumeView], .aggregates[Departure]; contexts[order-sourcing].aggregates[FulfillmentAssignment].invariants.

Omitted: ErrDepartureClosed (a lock after cutoffAt).

3. Loads​

Derived from: model.yaml → contexts[linehaul-transportation].aggregates[Load], .publishes, contexts[last-mile-delivery].policies[InductOnArrival].

Omitted: the refusals ErrPackageAlreadyLoaded and ErrLoadOverCapacity. InductOnArrival is last-mile-delivery's policy, drawn for context.

4. Cancellation and its consumers​

Derived from: model.yaml → contexts[linehaul-transportation].aggregates[Departure], .policies[PickupFromCutoffs], .publishes, contexts[delivery-promise].policies[RepromiseOnRisk].

Omitted: RepromiseOnRisk's outputs (PromiseRevised), shown in Domain Message Flow.

Hotspots​

#HotspotWhere it comes from in the model
H1Pickups are generated on NodeOperationalProfileDeclared, but the business decision limits them to ACTIVE nodes and a profile is declared before activation (ErrIncompleteOperationalProfile in node-topology). NodeActivated is consumed with no stated reaction.contexts[linehaul-transportation].policies[PickupFromCutoffs] vs .business_decisions[0]; contexts[node-topology].aggregates[Node].invariants
H2Resolved (G9): a PICKUP departure's lane is the node's default outbound lane (policy DefaultOutboundLane) and its capacityPackages is capacityOrders x packagesPerOrder (policy PickupCapacity); node-topology declares neither.aggregates[Departure].value_objects (Capacity{packages, booked}), aggregates[LaneSchedule].description ("or the node cutoffs for a pickup lane"); lane_rules.allowed
H3Resolved (ADR 0002 A14): BookOnLock runs after the vendor accepted; if the pickup is full (ErrDepartureFull), closed, cancelled or unknown, the service books the next SCHEDULED pickup of the same origin (BookingMoved) or publishes BookingFailed.policies[BookOnLock], aggregates[Departure].invariants
H4Resolved (G15, ADR 0002 A16, A28): FulfillmentReassigned and FulfillmentCancelled happen only before LOCKED, so nothing is booked; they update ExpectedVolumeView only and the release branch of BookOnLock was removed. ReleaseCapacity is used only by the rebooking of a cancelled departure.policies[BookOnLock]; contexts[order-sourcing].aggregates[FulfillmentAssignment].transitions, ErrAssignmentLocked, ErrCancelAfterLock
H5Resolved (ADR 0002 A21): CloseLoad, DispatchLoad and ReceiveLoad drive CloseDeparture, RecordDeparture and RecordArrival in the load's transaction; no route or clock of their own.aggregates[Departure].commands vs .inbound and .rest
H6DepartureCapacityChanged carries capacityPackages, yet no command changes capacity (only booked).publishes[DepartureCapacityChanged].data, aggregates[Departure].commands
H7Resolved for bookings (ADR 0002 A15): CancelDeparture rebooks every assignment booked on the departure onto the next eligible pickup in the same transaction. Loads on a cancelled departure: AddPackage and CloseLoad are ErrIllegalTransition.aggregates[Departure].transitions, policies