EventStorming
Design-level EventStorming in the notation of the ddd-crew
EventStorming glossary and cheat sheet,
reconstructed from the code on develop rather than from a workshop.
Hotspots are only gaps already recorded in ADRs, the README Deferred list
or .claude/rules/deferred-and-known-gaps.md.
Legend
Source: ddd-crew cheat-sheet colours. Omits: nothing — legend only.
1. Intake, allocation and release
Source: internal/application/usecases/receive_order.go, allocation.go,
retry_allocation.go, product_classification.go,
internal/adapters/inbound/kafka/product_classification_consumer.go,
release_confirmation_consumer.go, release_confirmation.go,
internal/domain/order/path_selection.go,
promise_policy.go. Omits: the reconfirm Order Line Backordered (lost
reservation) and the analytics fan-out of every event. The release
confirmation branch (Work Unit Created, Confirm Release,
Order Release Unconfirmed) exists only with
RELEASE_CONFIRMATION_MODE=kafka (ADR 0043),
which is off by default.
2. Hold, release and cancellation
Source: internal/application/usecases/release_held_order.go,
cancel_order.go, internal/domain/order/intake_intent.go, order.go
(EnsureCancellable, EnsureReleasable), ADR 0004, ADR 0020; the orphaned-hold sweep is network-fulfillment's
internal/application/usecases/sweep_orphaned_holds.go (its ADR 0024), which cancels through DELETE /orders/{id}. Omits:
cancellation by a direct customer (same command, different actor).
3. Re-promise and planned capacity
Source: internal/adapters/inbound/kafka/repromise_consumer.go,
planned_capacity_consumer.go, internal/application/usecases/repromise_order.go,
planned_capacity.go, internal/adapters/outbound/{kafkacatalog,kafkacptschedule,kafkapathcapacity}; the OrderRepromised
consumer is exception-management's internal/adapters/inbound/kafka/order_correlation_consumer.go.
Omits: the analytics projector (a read model built from every event, see
Order Funnel report).
Stickies and their evidence
| Sticky | Kind | Code evidence |
|---|---|---|
| Customer channel, Operator, Console user or AI agent | Actor | REST callers of internal/adapters/inbound/http, MCP get_order |
| Receive Order | Command | usecases.ReceiveOrder, POST /orders |
| Retry Allocation | Command | usecases.RetryAllocation, POST /orders/{id}/allocation-retries |
| Release Held Order | Command | usecases.ReleaseHeldOrder, POST /orders/{id}/releases |
| Cancel Order | Command | usecases.CancelOrder, DELETE /orders/{id} |
| Repromise Order | Command | usecases.RepromiseOrder |
| Apply Planned Capacity | Command | usecases.ApplyPlannedCapacity |
| Apply Product Classification | Command | usecases.ApplyProductClassification (ADR 0036) |
| Confirm Release | Command | usecases.ConfirmRelease, driven by inbound/kafka/release_confirmation_consumer.go (ADR 0043; opt-in) |
| Order | Aggregate | order.Order |
| Order Received … Order Repromised | Domain Event | internal/domain/shared/events.go |
| Task CPT Missed, Package Manifested | Domain Event (upstream) | inbound/kafka/repromise_consumer.go |
| Capacity Plan Created, Published, Shortage Detected | Domain Event (upstream) | inbound/kafka/planned_capacity_consumer.go |
| Product Classified | Domain Event (upstream, product-master) | inbound/kafka/product_classification_consumer.go |
| Work Unit Created | Domain Event (upstream, wes-work-planning) | inbound/kafka/release_confirmation_consumer.go (reads only reference and line_no; ADR 0043) |
| Path selection policy | Policy | order.PathSelectionPolicy (ADR 0021) |
| Promise policy | Policy | order.PromisePolicy (ADR 0014, 0017, 0020) |
| Allocate every line on receipt | Policy | ReceiveOrder calls allocateAndRelease |
| Reconfirm then release unless ship-complete is blocked | Policy | reconfirmBeforeRelease, releaseAllocatedLines, Order.EnsureReleasable (BR3) |
| Release confirmation: PENDING, CONFIRMED or UNCONFIRMED after a timeout | Policy (process manager) | releaseconfirmation.Confirmation, openReleaseConfirmations, usecases.FlagUnconfirmedReleases (ADR 0043; opt-in) |
| Held order must be ship-complete | Policy | order.ValidateIntakeIntent |
| No cancel once any line is released | Policy | Order.EnsureCancellable (BR6) |
| Re-promise on CPT missed or package manifested | Policy | RepromiseConsumer → RepromiseOrder |
| Catalogue, CPT schedule and capacity caches | Read Model | kafkacatalog, kafkacptschedule, kafkapathcapacity |
| Planned capacity windows | Read Model | planned_capacity_windows, order.PlannedCapacityWindow |
| Product classification copy | Read Model | product_classification_copy, ports.ProductClassificationLookup (ADR 0036) |
| Order view with promiseDate | Read Model | GET /orders/{id} response (orderResponse) |
| inventory-storage, product-master, wes-work-planning, process-path-management, fulfillment-execution, warehouse-planning, network-fulfillment, exception-management | External System | outbound and inbound adapters listed on Context Map |
| Order Line Released and Order Released raised only on the analytics topic | Event | publishReleaseFacts in allocation.go, ADR 0034 |
| Order Release Unconfirmed raised only on the analytics topic, by the housekeeping timeout | Event | FlagUnconfirmedReleases, ADR 0043 |
| Release confirmation is off by default, an unconfirmed line triggers no automatic action | Hotspot | ADR 0043, README Deferred list |
| network-fulfillment sweeps an undecided hold past acknowledgeBy plus grace | External System | network-fulfillment internal/application/usecases/sweep_orphaned_holds.go (its ADR 0024) cancels through DELETE /orders/{id}; the sweep is not in this service by design (ADR 0020 accepted deferral, README Deferred list) |
BR3 blocking a release is a hold, answered 201/200 with a Backordered order (no ship-complete-blocked problem type) | Policy | releaseAllocatedLines, Order.EnsureReleasable, br3_block_test.go, ADR 0003 |
| exception-management consumes Order Repromised | External System | published on warehouse.order-management.events (outbound/kafka.Publisher); exception-management internal/adapters/inbound/kafka/order_correlation_consumer.go uses it to auto-resolve the order's open exception cases |