Skip to main content

EventStorming (process level)

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.

Uses the ddd-crew EventStorming glossary & cheat sheet notation. Every sticky is an element of model.yaml. Events from other contexts are orange stickies next to the pink system that publishes them. The aggregate sticky is repeated on each board so lines do not cross. Hotspots are gaps or risks found in the model; each one names where it comes from. The network-wide board is EventStorming big picture.

Legend​

StickyColourMeaning here
Commandblue #a5d8ffOne of the nine commands of FulfillmentAssignment
Aggregateyellow #ffec99FulfillmentAssignment
Domain Eventorange #ffc078An event this context publishes, or a neighbour event it consumes
Policylilac #d0bfffA policy from policies, or a rule from business_decisions / invariants
Read Modelgreen #b2f2bbOne of the five read_models
External Systempink #fcc2d7A sibling context (with the neighbour policy that reacts)
Hotspotred #ff8787An open question or risk in the model
Actorwhite #ffffffA person or this context's own timer

1. Intake and the virtual queue​

Derived from: model.yaml → contexts[order-sourcing].consumes[CustomerOrderPlaced], .aggregates[FulfillmentAssignment] (description, commands, events), .policies[VirtualQueue]; contexts[customer-ordering].publishes[CustomerOrderPlaced].data.

Derived from: model.yaml → contexts[order-sourcing].read_models, .policies[AssignmentCost], .business_decisions (1 and 5), .rest (POST /assignments/{assignmentId}/reoptimisations), .aggregates[FulfillmentAssignment].throughput_estimate (the sweeps); contexts[linehaul-transportation].read_models[ExpectedVolumeView]; contexts[delivery-promise].aggregates[PromiseBook].

Omitted: the 29 events that feed the five read models (listed on Domain Events); a re-optimisation that keeps the same node, which raises nothing.

2. Release​

Derived from: model.yaml → contexts[order-sourcing].policies[VirtualQueue], .aggregates[FulfillmentAssignment].transitions (QUEUED → RELEASED, QUEUED → UNSOURCEABLE by ReleaseToNode), .invariants (ErrCandidateBreaksPromise, ErrNodeExcluded), .publishes (consumers); contexts[vendor-connectivity].policies[IssueOnRelease]; contexts[delivery-promise].policies[RepromiseOnRisk].

Omitted: ErrReleaseInFlight (a second release while one is pending), shown on Sequence Diagrams.

3. The node's answer: lock or refusal​

Derived from: model.yaml → contexts[order-sourcing].policies[LockOnCommit], .policies[ReassignOnRefusal], .aggregates[FulfillmentAssignment].transitions (RELEASED → LOCKED, RELEASED → QUEUED, RELEASED → UNSOURCEABLE), .invariants (ErrNodeExcluded), .value_objects (PromiseConstraint); .consumes[DepartureCancelled]; contexts[vendor-connectivity].publishes; contexts[linehaul-transportation].policies[BookOnLock].

Omitted: the check that the outcome's releaseNo is the pending release (older outcomes are ignored); node-performance also consumes the three purchase-order events.

4. Re-promise and cancellation​

Derived from: model.yaml → contexts[order-sourcing].aggregates[FulfillmentAssignment].transitions (UNSOURCEABLE → QUEUED, QUEUED/RELEASED → CANCELLED), .events, .invariants (ErrCancelAfterLock); contexts[delivery-promise].policies[RepromiseOnRisk]; contexts[customer-ordering].policies[CancelOnUnfulfillable]; contexts[vendor-connectivity].policies[CancelOnSourcingCancel], .aggregates[PurchaseOrder].invariants (ErrCancelAfterAcknowledgement).

5. Shipment and delivery​

Derived from: model.yaml → contexts[order-sourcing].consumes (VendorShipmentConfirmed, PackageDelivered), .aggregates[FulfillmentAssignment].transitions (LOCKED → SHIPPED, SHIPPED → DELIVERED), .publishes (FulfillmentShipped, FulfillmentDelivered); contexts[shipping-and-tracking].publishes[PackageDelivered].data.

Hotspot inventory​

HotspotBoardWhere it comes from in the model
H1 Promise-book hold stays on the witness node1business_decisions[0] (the assigned node may differ from the witness) against delivery-promise PromiseBook (capacity held on the witness cutoff); no policy moves the hold, and delivery-promise names no use for FulfillmentLocked
H2 No releaseAt when no candidate is left2policies[VirtualQueue] derives releaseAt from the best candidate; QUEUED → UNSOURCEABLE happens only by ReleaseToNode
H3 Cross-region as penalty vs rule1business_decisions[4] ("only when it is the only way") against policies[AssignmentCost] (crossRegionPenalty)
H4 Acceptance after cancellation (known residual, G12)4CancelAssignment from RELEASED against vendor-connectivity ErrCancelAfterAcknowledgement (cancel only while ISSUED); an acceptance that arrives after the cancel is only logged (policies[AcceptanceAfterCancelOnlyLogged])
H5 ApplyRevisedPromise raises FulfillmentConstraintRevised (resolved, ADR 0002 A9)4aggregates[FulfillmentAssignment].events lists FulfillmentConstraintRevised; it is raised in every non-terminal state, analytics only
H6 UNSOURCEABLE can be cancelled (resolved)4transitions now has UNSOURCEABLE → CANCELLED, so customer-ordering CancelOnUnfulfillable has a target
H7 Exclusion per promise revision without revisionNo3invariants (ErrNodeExcluded, "same promise revision") against value_objects (PromiseConstraint has no revision)
H8 Multi-package delivery5FulfillmentShipped.trackingNumbers (several) against PackageDelivered (one trackingNumber)
H9 Revision of an assignment that is not UNSOURCEABLE4delivery-promise RepromiseOnRisk also fires on cancelled departures and package exceptions; the only transition is from UNSOURCEABLE
H10 Destination not on the aggregate1candidate search needs the destination's delivery station (NetworkGraphView has ServiceAreaAssigned); PromiseConstraint and the aggregate description omit destinationPostalPrefix
H11 Pickup departure cancelled after the lock3invariants ("no change of node after LOCKED") is silent on the departure; consumes[DepartureCancelled] has no transition for a locked assignment