Warehouse execution (WES) · Core domain · EventStorming board

warehouse-planning

Answers 'can this site handle the demand in this window?': it keeps the volume forecast, works out path capacity and labour needed, plans and announces any shortage.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
10
commands
14
policies
15
read models
10
hot spots
6

The board, row by row

18 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 how fast one station works

    An operator states how much one station of a process handles per hour at a site. The station counts from the floor map are multiplied by this figure when a path's capacity is worked out.

    ActorOperator
    CommandDeclareStationStandardPUT /station-standards/{location}/{process_type}
    AggregateStationStandard

    Source: application/usecases/declare_station_standard.go · domain/processcapacity/station_standard.go

  2. Declare the labour a dock booking costs

    An operator states how many labour minutes a dock appointment, and each shipment notice on it, costs at a site for a process path. Without it, bookings add no labour demand and the plan says so.

    ActorOperator
    CommandDeclareInboundLabourStandardPUT /inbound-labour-standards/{location}/{path_id}
    AggregateLabourStandard

    Source: application/usecases/inbound_demand.go · domain/inbound/labour_standard.go

  3. Keep the process flows behind the plans

    The hand-made process path list is retired and said goodbye at its old address. The steps a plan follows now arrive only as flows kept current whenever process-path-management changes a path.

    Systemprocess-path-management
    EventProcessPathUpdated
    PolicyWhenever a process path changes, refresh this warehouse's copy of its steps.
    CommandApplyProcessPathChangestarted by the policy
    AggregateFlow
    Read model · kept up to dateProcess flows

    Source: adapters/inbound/kafka/process_flow_consumer.go · domain/processflow/flow.go · 0025-process-flows-from-process-path-management.md

  4. Register a capacity limit by hand

    A planner records one limit on a process at a location for a time window: labour, location, equipment, station, conveyor, buffer or replenishment. The lowest limit is what the process can really do. An announcement goes out only if that figure moves.

    ActorPlanner
    CommandRegisterProcessCapacityConstraintPOST /process-capacities
    AggregateProcessCapacity
    EventProcessCapacityRegistered
    EventProcessCapacityChanged

    Source: application/usecases/register_process_capacity_constraint.go · domain/processcapacity/process_capacity.go · domain/processcapacity/events.go

  5. Receive the volume forecast for a path

    A planner sends how many units a process path at a site is due to receive by each cut-off. A new forecast replaces the old one whole; sending the same one again changes nothing. No other context reads the announcement yet.

    ActorPlanner
    CommandReceiveWorkloadForecastPUT /workload-forecasts/{site_id}/{path_id}
    AggregateForecast
    EventWorkloadForecastReceived

    Source: application/usecases/workload_forecast.go · domain/workloadforecast/forecast.go · 0023-workload-forecast-and-labour-plan-move-here.md

  6. Draft a capacity plan

    A planner asks whether a path can handle the demand at a site in a window. Demand is typed in, read from expected orders or from the volume forecast. Several drafts of one window are what-if options to compare side by side.

    ActorPlanner
    Read modelPath capacity
    Read modelExpected orders
    Read modelVolume forecast
    Read modelLabour standards
    Read modelDock booking demand
    CommandCreateCapacityPlanPOST /capacity-plans
    AggregateCapacityPlan
    EventCapacityPlanCreated
    Systemorder-management
    PolicyKeeps the plan's window as a draft in its planned-capacity copy

    Source: application/usecases/create_capacity_plan.go · domain/capacityplan/capacity_plan.go · domain/capacityplan/events.go · 0024-forecast-demand-and-plan-scenarios.md

  7. Publish a plan and announce any shortage

    Publishing makes a draft plan official, once only, and replaces the plan published before it for the same site, path and window. If the path can do less than the demand, the shortage and the slowest step are announced too.

    ActorPlanner
    CommandPublishCapacityPlanPOST /capacity-plans/{id}/publications
    AggregateCapacityPlan
    EventCapacityPlanSuperseded
    EventCapacityPlanPublished
    EventCapacityShortageDetected
    EventBottleneckDetected
    Systemorder-management
    PolicyMarks the window published, retires a replaced plan and flags orders in a shortage; moves no promise
    Systemnetwork-inventory-planning
    PolicyKeeps the newest published plan window per site; plans without a site are skipped

    Source: application/usecases/publish_capacity_plan.go · domain/capacityplan/supersede.go · domain/capacityplan/events.go · 0024-forecast-demand-and-plan-scenarios.md

  8. Commit the labour plan for a shift

    A planner commits rate, heads and hours for a path in a shift. Heads cannot exceed the stations installed; left out, they are worked out from the forecast. If workforce-management committed different heads, the gap is flagged, never corrected.

    ActorPlanner
    Read modelVolume forecast
    Read modelStorage positions and stations
    Read modelHeads committed by workforce
    CommandCommitLabourPlanPUT /labour-plans/{site_id}/{shift_id}/{path_id}
    AggregatePlan
    EventLabourPlanCommitted
    EventLabourPlanDriftDetected
    Systemworkforce-management
    PolicyKeeps a copy of the required heads per path and shift and proposes heads from it

    Source: application/usecases/labour_plan.go · application/usecases/labour_plan_drift.go · domain/labourplan/plan.go · 0023-workload-forecast-and-labour-plan-move-here.md

  9. Turn committed shifts into labour limits

    Each line of a committed shift plan says how many people work a path, at what rate, for how many hours. That becomes a labour limit from the shift start for those hours. The rate is assumed to be units per hour.

    Systemworkforce-management
    EventShiftPlanCommitted
    PolicyWhenever a shift plan line is committed, register its heads times rate as a labour limit for its hours
    CommandRegisterProcessCapacityConstraintstarted by the policy
    AggregateProcessCapacity
    EventProcessCapacityRegistered
    EventProcessCapacityChanged

    Source: adapters/inbound/kafka/labor_capacity_consumer.go · application/usecases/register_process_capacity_constraint.go · domain/processcapacity/process_capacity.go

  10. Compare committed heads with the labour plan

    A committed shift line that names its shift also records the heads workforce-management put on the path. If they differ from the labour plan, and the gap is new, it is flagged. Neither side is changed and nothing outside reads the flag yet.

    Systemworkforce-management
    EventShiftPlanCommitted
    PolicyWhenever a shift line is committed, store its heads and flag a new gap from the labour plan
    CommandRecordShiftCommitmentstarted by the policy
    AggregateCommitment
    EventLabourPlanDriftDetected
    Read model · kept up to dateHeads committed by workforce

    Source: application/usecases/labour_plan_drift.go · adapters/inbound/kafka/labor_capacity_consumer.go · domain/labourplan/commitment.go

  11. Keep the labour standards

    labor-performance announces how many seconds a pick, pack or label task should take, per site or for all sites. This service keeps every version and uses the one in force for a plan's window to state the labour each step needs.

    Systemlabor-performance
    EventLaborStandardDefined
    PolicyWhenever a labour standard is defined or revised, add it to the local copy
    CommandRecordLaborStandardstarted by the policy
    Read model · kept up to dateLabour standards

    Source: application/usecases/labor_standard.go · adapters/inbound/kafka/labor_standard_consumer.go · 0022-labour-standards-from-labor-performance.md

  12. Keep the process flows

    process-path-management announces each flow: the stages a path passes through, in order. A newer version replaces an older one, so repeats and late arrivals are harmless. Path capacity reads these flows first.

    Systemprocess-path-management
    EventProcessFlowDefined
    PolicyWhenever a flow is defined, revised or retired, keep the newer version in the local copy
    CommandRecordProcessFlowstarted by the policy
    Read model · kept up to dateProcess flows

    Source: application/usecases/process_flow.go · adapters/inbound/kafka/process_flow_consumer.go · 0025-process-flows-from-process-path-management.md

  13. Count a new slot on the floor

    facility-layout announces each slot. Storage slots add storage positions and work-center slots add stations, per zone. Station counts are multiplied by the declared station standard when a path's capacity is worked out.

    Systemfacility-layout
    EventLocationSlotRegistered
    PolicyWhenever a slot is registered, add it to its zone's count of storage positions or stations
    Read model · kept up to dateStorage positions and stations

    Source: adapters/inbound/kafka/storage_capacity_consumer.go · 0002-station-capacity-composition.md

  14. Remove a retired slot from the count

    When facility-layout takes a slot out of service, it comes out of its zone's count. The count only ever follows the floor map and registers no capacity limit itself.

    Systemfacility-layout
    EventLocationSlotDecommissioned
    PolicyWhenever a slot is decommissioned, take it off its zone's count of positions or stations
    Read model · kept up to dateStorage positions and stations

    Source: adapters/inbound/kafka/storage_capacity_consumer.go · 0002-station-capacity-composition.md

  15. Keep the expected-orders list

    Each allocated order, fully or partly, counts once at its latest promise cutoff toward the demand of the site its event names, or of the configured site when it names none. Cancellations are not seen, so the figure can overstate demand.

    Systemorder-management
    EventOrderAllocated
    PolicyWhenever an order is allocated, fully or partly, record it at its promise cutoff for its own or the configured site
    CommandRecordOrderDemandstarted by the policy
    Read model · kept up to dateExpected orders

    Source: application/usecases/expected_demand.go · adapters/inbound/kafka/order_demand_consumer.go · 0004-demand-ingestion-from-order-management.md · 0021-order-demand-and-labour-read-the-events-own-site.md

  16. Keep the dock-bookings list

    dock-scheduling announces bookings, moves, cancellations and no-shows. Each has a version and the newest wins, so a cancellation that arrives first still sticks. Cancelled and missed bookings stop counting as demand.

    Systemdock-scheduling
    EventDockAppointmentBooked
    PolicyWhenever a dock appointment is booked, moved, cancelled or missed, update the dock-booking demand copy
    CommandRecordInboundAppointmentstarted by the policy
    Read model · kept up to dateDock booking demand

    Source: application/usecases/inbound_demand.go · adapters/inbound/kafka/dock_appointment_consumer.go · 0020-inbound-demand-from-dock-scheduling.md

  17. Count what the floor really completes

    Completed tasks are counted per process step and minute. A plan's variance view sets them against the planned capacity. It is advice only and never changes a plan.

    Systemfulfillment-execution
    EventTaskCompleted
    PolicyWhenever a task is completed, add it to the count for its process step and minute
    CommandRecordObservedCompletionstarted by the policy
    Read model · kept up to dateObserved completions

    Source: application/usecases/observed_capacity.go · adapters/inbound/kafka/observed_capacity_consumer.go · 0017-inbound-labour-demand-and-observed-capacity-feedback.md

  18. Feed the plan reports

    The service reads its own plan announcements and keeps daily facts for the reports: bottleneck frequency, shortage trend and plan throughput. A replaced plan still counts as published there.

    Event · earlierCapacityPlanPublished
    PolicyWhenever a plan is created or published, add it to the plan facts behind the reports
    Read model · kept up to datePlan reports

    Source: adapters/inbound/kafka/analytics_consumer.go · 0005-analytics-read-side.md · 0024-forecast-demand-and-plan-scenarios.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 warehouse-planning at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.