Warehouse execution (WES) · Core domain · EventStorming board

wes-work-planning

Releases work to the floor continuously, earliest cut-off first, from orders, transfers, slot moves and top-ups. It watches backlog and flags where to rebalance.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
8
commands
13
policies
15
read models
6
hot spots
3

The board, row by row

15 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. Turn an allocated order into work

    When an order is allocated, fully or in part, each released line becomes one work unit on its process path. A path the catalogue does not know is refused loudly instead of filling a pool nobody serves.

    Systemorder-management
    EventOrderAllocated
    PolicyWhenever an order is allocated, enqueue one work unit per released line
    CommandApplyOrderAllocatedstarted by the policy
    AggregateWorkUnit
    EventWorkUnitCreated
    Systemorder-management
    PolicyConfirms the order line was released to the floor planner, so it knows nothing was lost

    Source: application/usecases/apply_order_allocated.go · application/usecases/enqueue_work_unit.go · domain/workunit/work_unit.go

  2. Turn a stock transfer into work

    network-inventory-planning releases a transfer demand. It becomes one work unit named after the demand, so a repeat of the same demand never makes a second one. Only transfer legs are accepted, never relocation.

    Systemnetwork-inventory-planning
    EventWorkDemandReleased
    PolicyWhenever a transfer demand is released, enqueue one work unit for it
    CommandApplyWorkDemandReleasedstarted by the policy
    AggregateWorkUnit
    EventWorkUnitCreated

    Source: application/usecases/apply_work_demand_released.go · adr/0033-transfer-work-demand-choreography.md

  3. Turn an approved slot plan into relocation work

    slotting-optimization approves a plan of moves. Each move becomes a relocation unit, and a move waiting on another stays blocked until that one completes. A newer plan cancels the older plan's unreleased moves.

    Systemslotting-optimization
    EventSlotPlanApproved
    PolicyWhenever a slot plan is approved, plan one relocation unit per move and cancel older unreleased moves
    CommandApplySlotPlanApprovedstarted by the policy
    AggregateWorkUnit
    EventWorkUnitCreated

    Source: application/usecases/apply_slot_plan_approved.go · domain/relocation/plan.go · adr/0040-slot-plan-relocation-work.md

  4. Turn a pick-face top-up request into work

    pick-face-replenishment asks for a top-up, and it becomes one work unit, urgent ones sorting ahead. A cancellation before release withdraws the unit. Work already released runs to completion.

    Systempick-face-replenishment
    EventReplenishmentRequested
    PolicyWhenever a top-up is requested, plan one work unit for it, with a deadline set by its priority
    CommandApplyReplenishmentRequestedstarted by the policy
    AggregateWorkUnit
    EventWorkUnitCreated

    Source: application/usecases/apply_replenishment_requested.go · application/usecases/apply_replenishment_cancelled.go · adr/0042-pick-face-replenishment-work.md

  5. Add work to a path by hand

    A supervisor, or an agent, adds one work unit to a path's pool. A case pick is checked against the SKU's active case pack level and refused if it cannot be checked.

    ActorSupervisor
    Read modelPack facts per SKU
    CommandEnqueueWorkUnitPOST /paths/{pathId}/work-units
    AggregateWorkUnit
    EventWorkUnitCreated

    Source: application/usecases/enqueue_work_unit.go · domain/workunit/work_unit.go · adr/0045-pack-aware-work-units.md

  6. Release the next work

    A supervisor, or an agent, releases the pending work unit with the earliest cut-off. A path fed by release stops at its work-in-progress limit. The release carries hazard hints from the product's classification.

    ActorSupervisor
    Read modelProduct hazard classes
    CommandReleaseNextWorkPOST /paths/{pathId}/work-releases
    AggregateWorkPool
    EventWorkReleased
    Systemfulfillment-execution
    PolicyTurns the released work into a floor task needing the skills its path requires

    Source: application/usecases/release_next_work.go · domain/release/work_pool.go · domain/release/release_policy.go

  7. Finish a work unit when its task is done

    When the floor completes the task, the work unit is completed and its slot in the pool is freed. A completed relocation admits the moves that were waiting behind it. Tasks this service never planned are ignored.

    Systemfulfillment-execution
    EventTaskCompleted
    PolicyWhenever a floor task completes, complete its work unit and free its work-in-progress slot
    CommandApplyTaskCompletedstarted by the policy
    AggregateWorkUnit
    EventWorkUnitCompleted

    Source: application/usecases/apply_task_completed.go · application/usecases/record_completion.go · adr/0043-taskcompleted-already-completed-skip.md

  8. Watch a path's backlog

    A supervisor samples a path's backlog. Over its alarm threshold, an alarm goes out. If a cut-off time is given, the path's remaining room for new work before it is announced too.

    ActorSupervisor
    CommandSampleBacklogGET /paths/{pathId}/telemetry
    AggregateWorkPool
    EventBacklogThresholdBreached
    EventPathCapacityChanged
    Systemexception-management
    PolicyOpens or updates an exception for the path on a backlog alarm
    Systemorder-management
    PolicyKeeps the remaining room per path and cut-off for its delivery promises
    Systemnetwork-fulfillment
    PolicyKeeps the remaining room per path for its own capacity figures

    Source: application/usecases/sample_backlog.go · domain/release/work_pool.go · adr/0018-path-capacity-changed.md

  9. Decide how to rebalance a path

    A supervisor asks what to do about a path. A flow-fed path over its alarm gets 'throttle upstream'. A release-fed path stuck at its limit with work waiting gets 'reassign labour'. Both are flags only. A rate deviation notice is declared but never raised.

    ActorSupervisor
    Read modelLabour plan from workforce
    CommandRebalanceDecisionPOST /paths/{pathId}/rebalance-decisions
    AggregateWorkPool
    EventPathThrottled
    EventLaborReassignmentFlagged
    EventRateDeviationDetected

    Source: application/usecases/rebalance_decision.go · adr/0003-flow-balancing-as-domain-service.md · adr/0020-flowfed-path-observed-throughput-signal.md

  10. Set how a path's pool is fed

    A supervisor sets whether a path is fed by release or by flow, and its work-in-progress limit. Lowering the limit never evicts work: releases just pause until the count falls under it. Nothing is announced.

    ActorSupervisor
    CommandConfigurePoolPUT /paths/{pathId}/pool
    AggregateWorkPool

    Source: application/usecases/configure_pool.go · domain/release/work_pool.go · adr/0034-configure-pool-command.md

  11. Keep the latest labour plan per path

    workforce-management commits its headcount per path. This service keeps a read-only copy that supervisors can look up and that comes back with a rebalance answer. Since planning moved to warehouse-planning, nothing is compared here.

    Systemworkforce-management
    EventShiftPlanCommitted
    PolicyWhenever the labour plan for a path arrives, replace the local copy with it
    CommandObserveLaborPlanstarted by the policy
    Read model · kept up to dateLabour plan from workforce

    Source: application/usecases/observe_labor_plan.go · domain/laborview/labor_plan_observed.go · adr/0049-charge-forecast-and-shift-plan-move-to-warehouse-planning.md

  12. Keep the process-path list

    process-path-management announces every path defined, revised or retired. When the catalogue source is set to that feed, this service follows it live. By default it reads a file instead.

    Systemprocess-path-management
    EventProcessPathCreated
    PolicyWhenever a path is created, revised or retired, update the local process-path list
    Read model · kept up to dateProcess-path list

    Source: adapters/outbound/kafkacatalog/consumer.go · cmd/wes/catalogue.go · adr/0030-kafka-sourced-path-catalogue.md

  13. Keep the product hazard and pack facts

    product-master announces each product's classification, such as hazmat or fragile, and its pack levels. This service keeps its own copies and stamps the hints on released work. A newer version replaces an older one.

    Systemproduct-master
    EventProductClassified
    PolicyWhenever a product is classified or its pack level changes, replace the local copy with the newer version
    CommandObserveProductClassificationstarted by the policy
    Read model · kept up to dateProduct hazard classes
    Read model · kept up to datePack facts per SKU

    Source: application/usecases/observe_product_classification.go · application/usecases/observe_pack_level.go · adapters/inbound/kafka/product_classification_consumer.go · adr/0035-product-classification-local-copy.md · adr/0045-pack-aware-work-units.md

  14. Keep the usable-stock view

    inventory-storage announces stock reserved and reservations revoked. This service keeps a read-only count of usable stock per SKU that operators can look up. No release decision depends on it.

    Systeminventory-storage
    EventStockReserved
    PolicyWhenever stock is reserved or a reservation is revoked, adjust the usable-stock count for that SKU
    CommandObserveInventoryChangestarted by the policy
    Read model · kept up to dateUsable stock per SKU

    Source: application/usecases/observe_inventory_change.go · domain/inventoryview/usable_inventory_observed.go · adr/0006-labor-plan-view-not-shift-plan.md

  15. Feed the throughput report

    The service reads its own announcements and keeps hourly figures per path: work released and completed, backlog alarms and throttling. They feed the release throughput report.

    Event · earlierWorkReleased
    PolicyWhenever work is released or completed, or an alarm is raised, add it to that path's hourly figures
    Read model · kept up to dateRelease throughput report

    Source: adapters/inbound/kafka/analytics_consumer.go · adr/0011-analytical-data-product.md

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 wes-work-planning at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.