Warehouse management (WMS) · Supporting domain · EventStorming board
pick-face-replenishment
Watches forward pick faces against a min/max rule and asks for stock to be moved from the fullest reserve bin, then closes the request when the move is recorded.
- events published
- 4
- commands
- 10
- policies
- 12
- read models
- 6
- hot spots
- 4
The story in 3 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventReplenishment
Requested - Pivotal eventReplenishment
Completed - Pivotal eventReplenishment
Cancelled
Listens to (5): contexts whose events this one reacts to
Tells (1): contexts that react to its events
The board, row by row
10 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.
- Event
- Command
- Actor
- Aggregate
- Policy
- Read model
- External system
- Hot spot
- Opportunity
-
Declare a min/max rule for a pick face
A planner sets the minimum, maximum and case multiple for one SKU at one site. Changing a rule needs the version the planner last saw.
ActorPlannerRead modelPack levelsCommandDeclarePolicy PUT /policies/{siteId}/{sku}AggregatePolicyEventReplenishmentPolicy analytics stream onlyDeclared Source: application/usecases/declare_policy.go · domain/policy/policy.go
-
Ask for stock when a face runs low
inventory-storage reports a new bin level. If the pick face of that SKU is now at or below its minimum, a request is raised to move stock from the fullest reserve bin.
Systeminventory-storage EventBinStock Level Changed PolicyWhenever a bin level changes, keep it and re-check that SKU's pick faceRead modelPoliciesRead modelReserve binsRead modelForward assignmentsCommandApplyBin started by the policyLevel AggregateRequestEventReplenishmentRequested Read model · kept up to dateBin stock levelsSystemwes-work- planning PolicyPlans one REPLENISH work unit for the requestSource: application/usecases/apply_bin_level.go · application/usecases/evaluator.go · domain/detection/detector.go · domain/replenishment/request.go · adapters/inbound/kafka/inventory_consumer.go
-
Close the request when the stock has moved
inventory-storage records a relocation tagged as replenishment. If it matches an open request, the request is completed with the quantity actually moved.
Systeminventory-storage EventStockRelocated PolicyWhenever a replenishment move is recorded for an open request, complete that requestCommandApplyRelocation started by the policyAggregateRequestEventReplenishmentCompleted Source: application/usecases/apply_relocation.go · domain/replenishment/request.go · adapters/inbound/kafka/inventory_consumer.go
-
Check a whole site by hand
A planner re-runs detection for every pick face of a site. Faces that already have an open request are left alone, so running it twice raises nothing new.
ActorPlannerRead modelPoliciesRead modelBin stock levelsCommandEvaluateSite POST /sites/{siteId}/evaluationsAggregateRequestEventReplenishmentRequested Systemwes-work- planning PolicyPlans one REPLENISH work unit for the requestSource: application/usecases/evaluate_site.go · application/usecases/evaluator.go
-
Ask for a replenishment by hand
A planner raises a request for one SKU, optionally with a quantity. It is refused if there is no pick face, no rule or no source stock, or if a request is already open.
ActorPlannerRead modelPoliciesRead modelBin stock levelsCommandRaiseManual POST /replenishmentsRequest AggregateRequestEventReplenishmentRequested Systemwes-work- planning PolicyPlans one REPLENISH work unit for the requestSource: application/usecases/raise_manual_request.go · domain/replenishment/request.go
-
Follow the case size from product-master
A rule can take its multiple from the SKU's case size instead of a typed number. When the case size changes, such rules get a new multiple. A retired case size flags them stale.
Systemproduct-master EventProductPack Level Declared PolicyWhenever a case size is declared, keep it and re-derive the multiple of rules that follow itCommandApplyPack started by the policyLevel Declared AggregatePolicyEventReplenishmentPolicy analytics stream onlyDeclared Read model · kept up to datePack levelsSource: application/usecases/pack_level.go · adapters/inbound/kafka/productmaster_consumer.go · 0009-pack-derived-replenishment-multiple.md
-
Follow the approved slot plan
slotting-optimization approves a new forward map. Requests whose face no longer holds that SKU are cancelled, and new or moved faces are checked for stock.
Systemslotting-optimization EventSlotPlan Approved PolicyWhenever a newer slot plan is approved, replace the forward map and cancel requests it dropsCommandApplyForward started by the policyAssignment Map AggregateRequestEventReplenishmentCancelled EventReplenishmentRequested Read model · kept up to dateForward assignmentsSystemwes-work- planning PolicyWithdraws REPLENISH work that is still pendingSystemwes-work- planning PolicyPlans one REPLENISH work unit for the requestSource: application/usecases/apply_forward_assignments.go · adapters/inbound/kafka/slotting_consumer.go · 0005-evaluation-semantics-and-persistence.md
-
Keep the layout copy
facility-layout announces zones and locations, and later retires some. Here a copy tells which bins are pick faces and which are reserve bins.
Systemfacility-layout EventLocationSlot Registered PolicyWhenever a zone or location is registered or decommissioned, update the layout copyCommandApplyLocation started by the policyRegistered Read model · kept up to dateZones and locationsSource: application/usecases/apply_layout.go · adapters/inbound/kafka/layout_consumer.go
-
Cancel a request
A planner cancels a request that is still open. A completed or cancelled request is final and cannot be cancelled again.
ActorPlannerCommandCancelRequest POST /replenishments/{requestId}/cancellationsAggregateRequestEventReplenishmentCancelled Systemwes-work- planning PolicyWithdraws REPLENISH work that is still pendingSource: application/usecases/cancel_request.go · domain/replenishment/request.go
-
Remove a rule and its open requests
A planner removes the rule of a SKU. In the same step every open request for that SKU at the site is cancelled.
ActorPlannerCommandRemovePolicy DELETE /policies/{siteId}/{sku}AggregateRequestEventReplenishmentCancelled Systemwes-work- planning PolicyWithdraws REPLENISH work that is still pendingSource: application/usecases/remove_policy.go · domain/replenishment/request.go
Hot spots and opportunities
Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.
- Hot spotA bin never seen reads as level 0, so a face whose level has not arrived yet can get an unnecessary URGENT request.
- Hot spotRequests only become floor work if wes-work-planning opts in and the REPLENISH path is seeded; cluster state was not checked.
Source: docs/ddd/eventstorming.md
- Hot spotA partial fill leaves the face below its maximum. The next detection raises a fresh request once the first is closed.
- Hot spotUntil a bin changes, its stock level is unknown because inventory-storage has no backfill. Detection then finds no source bin.
Source: docs/ecosystem/integration.md
Opportunities
- OpportunityA demand-cover rule (days of cover from demand) is planned as a later policy kind behind the same shape as min/max.
- OpportunityVelocity-derived min/max, multi-SKU faces, reserve-to-reserve consolidation and travel-aware source choice are listed for later ADRs.
This board is a reconstruction from the code and documentation of pick-face-replenishment at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.