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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

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.

  1. Pivotal eventReplenishmentRequested
  2. Pivotal eventReplenishmentCompleted
  3. Pivotal eventReplenishmentCancelled

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
  1. 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.

    ActorPlanner
    Read modelPack levels
    CommandDeclarePolicyPUT /policies/{siteId}/{sku}
    AggregatePolicy
    EventReplenishmentPolicyDeclaredanalytics stream only

    Source: application/usecases/declare_policy.go · domain/policy/policy.go

  2. 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
    EventBinStockLevelChanged
    PolicyWhenever a bin level changes, keep it and re-check that SKU's pick face
    Read modelPolicies
    Read modelReserve bins
    Read modelForward assignments
    CommandApplyBinLevelstarted by the policy
    AggregateRequest
    EventReplenishmentRequested
    Read model · kept up to dateBin stock levels
    Systemwes-work-planning
    PolicyPlans one REPLENISH work unit for the request

    Source: application/usecases/apply_bin_level.go · application/usecases/evaluator.go · domain/detection/detector.go · domain/replenishment/request.go · adapters/inbound/kafka/inventory_consumer.go

  3. 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 request
    CommandApplyRelocationstarted by the policy
    AggregateRequest
    EventReplenishmentCompleted

    Source: application/usecases/apply_relocation.go · domain/replenishment/request.go · adapters/inbound/kafka/inventory_consumer.go

  4. 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.

    ActorPlanner
    Read modelPolicies
    Read modelBin stock levels
    CommandEvaluateSitePOST /sites/{siteId}/evaluations
    AggregateRequest
    EventReplenishmentRequested
    Systemwes-work-planning
    PolicyPlans one REPLENISH work unit for the request

    Source: application/usecases/evaluate_site.go · application/usecases/evaluator.go

  5. 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.

    ActorPlanner
    Read modelPolicies
    Read modelBin stock levels
    CommandRaiseManualRequestPOST /replenishments
    AggregateRequest
    EventReplenishmentRequested
    Systemwes-work-planning
    PolicyPlans one REPLENISH work unit for the request

    Source: application/usecases/raise_manual_request.go · domain/replenishment/request.go

  6. 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
    EventProductPackLevelDeclared
    PolicyWhenever a case size is declared, keep it and re-derive the multiple of rules that follow it
    CommandApplyPackLevelDeclaredstarted by the policy
    AggregatePolicy
    EventReplenishmentPolicyDeclaredanalytics stream only
    Read model · kept up to datePack levels

    Source: application/usecases/pack_level.go · adapters/inbound/kafka/productmaster_consumer.go · 0009-pack-derived-replenishment-multiple.md

  7. 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
    EventSlotPlanApproved
    PolicyWhenever a newer slot plan is approved, replace the forward map and cancel requests it drops
    CommandApplyForwardAssignmentMapstarted by the policy
    AggregateRequest
    EventReplenishmentCancelled
    EventReplenishmentRequested
    Read model · kept up to dateForward assignments
    Systemwes-work-planning
    PolicyWithdraws REPLENISH work that is still pending
    Systemwes-work-planning
    PolicyPlans one REPLENISH work unit for the request

    Source: application/usecases/apply_forward_assignments.go · adapters/inbound/kafka/slotting_consumer.go · 0005-evaluation-semantics-and-persistence.md

  8. 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
    EventLocationSlotRegistered
    PolicyWhenever a zone or location is registered or decommissioned, update the layout copy
    CommandApplyLocationRegisteredstarted by the policy
    Read model · kept up to dateZones and locations

    Source: application/usecases/apply_layout.go · adapters/inbound/kafka/layout_consumer.go

  9. Cancel a request

    A planner cancels a request that is still open. A completed or cancelled request is final and cannot be cancelled again.

    ActorPlanner
    CommandCancelRequestPOST /replenishments/{requestId}/cancellations
    AggregateRequest
    EventReplenishmentCancelled
    Systemwes-work-planning
    PolicyWithdraws REPLENISH work that is still pending

    Source: application/usecases/cancel_request.go · domain/replenishment/request.go

  10. 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.

    ActorPlanner
    CommandRemovePolicyDELETE /policies/{siteId}/{sku}
    AggregateRequest
    EventReplenishmentCancelled
    Systemwes-work-planning
    PolicyWithdraws REPLENISH work that is still pending

    Source: 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.

Opportunities

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.