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.
- events published
- 10
- commands
- 14
- policies
- 15
- read models
- 10
- hot spots
- 6
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventWorkload
Forecast Received - Pivotal eventCapacity
Plan Created - Pivotal eventCapacity
Plan Published - Pivotal eventCapacity
Shortage Detected - Pivotal eventLabour
Plan Committed
Listens to (7): contexts whose events this one reacts to
Tells (3): contexts that react to its events
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
-
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.
ActorOperatorCommandDeclareStation PUT /station-standards/{location}/{process_type}Standard AggregateStationStandard Source: application/usecases/declare_station_standard.go · domain/processcapacity/station_standard.go
-
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.
ActorOperatorCommandDeclareInbound PUT /inbound-labour-standards/{location}/{path_id}Labour Standard AggregateLabourStandard Source: application/usecases/inbound_demand.go · domain/inbound/labour_standard.go
-
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 EventProcessPath Updated PolicyWhenever a process path changes, refresh this warehouse's copy of its steps.CommandApplyProcess started by the policyPath Change AggregateFlowRead model · kept up to dateProcess flowsSource: adapters/inbound/kafka/process_flow_consumer.go · domain/processflow/flow.go · 0025-process-flows-from-process-path-management.md
-
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.
ActorPlannerCommandRegisterProcess POST /process-capacitiesCapacity Constraint AggregateProcessCapacity EventProcessCapacity Registered EventProcessCapacity Changed Source: application/usecases/register_process_capacity_constraint.go · domain/processcapacity/process_capacity.go · domain/processcapacity/events.go
-
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.
ActorPlannerCommandReceiveWorkload PUT /workload-forecasts/{site_id}/{path_id}Forecast AggregateForecastEventWorkloadForecast Received Source: application/usecases/workload_forecast.go · domain/workloadforecast/forecast.go · 0023-workload-forecast-and-labour-plan-move-here.md
-
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.
ActorPlannerRead modelPath capacityRead modelExpected ordersRead modelVolume forecastRead modelLabour standardsRead modelDock booking demandCommandCreateCapacity POST /capacity-plansPlan AggregateCapacityPlan EventCapacityPlan Created Systemorder-management PolicyKeeps the plan's window as a draft in its planned-capacity copySource: application/usecases/create_capacity_plan.go · domain/capacityplan/capacity_plan.go · domain/capacityplan/events.go · 0024-forecast-demand-and-plan-scenarios.md
-
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.
ActorPlannerCommandPublishCapacity POST /capacity-plans/{id}/publicationsPlan AggregateCapacityPlan EventCapacityPlan Superseded EventCapacityPlan Published EventCapacityShortage Detected EventBottleneckDetected Systemorder-management PolicyMarks the window published, retires a replaced plan and flags orders in a shortage; moves no promiseSystemnetwork-inventory- planning PolicyKeeps the newest published plan window per site; plans without a site are skippedSource: application/usecases/publish_capacity_plan.go · domain/capacityplan/supersede.go · domain/capacityplan/events.go · 0024-forecast-demand-and-plan-scenarios.md
-
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.
ActorPlannerRead modelVolume forecastRead modelStorage positions and stationsRead modelHeads committed by workforceCommandCommitLabour PUT /labour-plans/{site_id}/{shift_id}/{path_id}Plan AggregatePlanEventLabourPlan Committed EventLabourPlan Drift Detected Systemworkforce-management PolicyKeeps a copy of the required heads per path and shift and proposes heads from itSource: application/usecases/labour_plan.go · application/usecases/labour_plan_drift.go · domain/labourplan/plan.go · 0023-workload-forecast-and-labour-plan-move-here.md
-
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 EventShiftPlan Committed PolicyWhenever a shift plan line is committed, register its heads times rate as a labour limit for its hoursCommandRegisterProcess started by the policyCapacity Constraint AggregateProcessCapacity EventProcessCapacity Registered EventProcessCapacity Changed Source: adapters/inbound/kafka/labor_capacity_consumer.go · application/usecases/register_process_capacity_constraint.go · domain/processcapacity/process_capacity.go
-
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 EventShiftPlan Committed PolicyWhenever a shift line is committed, store its heads and flag a new gap from the labour planCommandRecordShift started by the policyCommitment AggregateCommitmentEventLabourPlan Drift Detected Read model · kept up to dateHeads committed by workforceSource: application/usecases/labour_plan_drift.go · adapters/inbound/kafka/labor_capacity_consumer.go · domain/labourplan/commitment.go
-
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 EventLaborStandard Defined PolicyWhenever a labour standard is defined or revised, add it to the local copyCommandRecordLabor started by the policyStandard Read model · kept up to dateLabour standardsSource: application/usecases/labor_standard.go · adapters/inbound/kafka/labor_standard_consumer.go · 0022-labour-standards-from-labor-performance.md
-
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 EventProcessFlow Defined PolicyWhenever a flow is defined, revised or retired, keep the newer version in the local copyCommandRecordProcess started by the policyFlow Read model · kept up to dateProcess flowsSource: application/usecases/process_flow.go · adapters/inbound/kafka/process_flow_consumer.go · 0025-process-flows-from-process-path-management.md
-
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 EventLocationSlot Registered PolicyWhenever a slot is registered, add it to its zone's count of storage positions or stationsRead model · kept up to dateStorage positions and stationsSource: adapters/inbound/kafka/storage_capacity_consumer.go · 0002-station-capacity-composition.md
-
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 EventLocationSlot Decommissioned PolicyWhenever a slot is decommissioned, take it off its zone's count of positions or stationsRead model · kept up to dateStorage positions and stationsSource: adapters/inbound/kafka/storage_capacity_consumer.go · 0002-station-capacity-composition.md
-
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 siteCommandRecordOrder started by the policyDemand Read model · kept up to dateExpected ordersSource: 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
-
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 EventDockAppointment Booked PolicyWhenever a dock appointment is booked, moved, cancelled or missed, update the dock-booking demand copyCommandRecordInbound started by the policyAppointment Read model · kept up to dateDock booking demandSource: application/usecases/inbound_demand.go · adapters/inbound/kafka/dock_appointment_consumer.go · 0020-inbound-demand-from-dock-scheduling.md
-
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 minuteCommandRecordObserved started by the policyCompletion Read model · kept up to dateObserved completionsSource: application/usecases/observed_capacity.go · adapters/inbound/kafka/observed_capacity_consumer.go · 0017-inbound-labour-demand-and-observed-capacity-feedback.md
-
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 · earlierCapacityPlan Published PolicyWhenever a plan is created or published, add it to the plan facts behind the reportsRead model · kept up to datePlan reportsSource: 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.
- Hot spotA shift event carries no window start and no rate unit field. The window is the event time plus planned hours, and the rate is taken as units per hour.
- Hot spotTask completions carry no site, so every completion goes to one configured site.
Source: adr/0017-inbound-labour-demand-and-observed-capacity-feedback.md
- Hot spotOrders whose event names no site still go to one configured site, and cancellations are not netted, so demand can be overstated.
Source: adr/0021-order-demand-and-labour-read-the-events-own-site.md
- Hot spotStations counted without a declared station standard only raise a warning. No throughput is invented for them.
- Hot spotPaths declared here by hand and flows from process-path-management live side by side until a live check shows every local path has a flow.
Source: adr/0025-process-flows-from-process-path-management.md
- Hot spotProcessCapacityRegistered and ProcessCapacityChanged are published, but their consumer is marked as not built yet.
Source: apis/asyncapi.yaml
Opportunities
- OpportunityAdjusting planned capacity automatically from observed throughput is left to a later decision, which must show it cannot oscillate.
Source: adr/0017-inbound-labour-demand-and-observed-capacity-feedback.md
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.