Warehouse execution (WES) · Supporting domain · EventStorming board
material-flow-control
Turns a warehouse transport request into a finished move of a container across the rack and the robots, and knows where every container physically is.
- events published
- 7
- commands
- 15
- policies
- 12
- read models
- 8
- hot spots
- 4
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventTransport
Accepted - Pivotal eventContainer
Arrived At Station - Pivotal eventTransport
Completed - Pivotal eventTransport
Failed - Pivotal eventContainer
Sent To Clarification
Listens to (2): contexts whose events this one reacts to
Tells (0): contexts that react to its events
none
The board, row by row
16 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
-
Accept a transport request
The warehouse execution system asks to move a container. From local knowledge only, the request is checked, a route over the rack and the robots is planned and an order is opened. The same request id always gets the same answer.
ActorWarehouse execution systemRead modelWhere each container isRead modelSubsystem capacityRead modelThe floor layoutCommandRequestTransport POST /transport-requestsAggregateOrderEventTransportAccepted Source: application/usecases/requests.go · domain/transportorder/order.go · domain/routing/routing.go
-
Refuse a request that cannot be done
A request is refused at once, with a plain reason, when the container is unknown at its source or already moving, the destination cannot be reached, or a machine on the route is unavailable. The refusal is recorded and published.
ActorWarehouse execution systemRead modelWhere each container isRead modelSubsystem capacityCommandRequestTransport POST /transport-requestsAggregateRequestEventTransportRejected Source: application/usecases/requests.go · domain/transportrequest/request.go
-
Send each step to the right machine
The next step of an order is sent, in order, to the rack controller or the robot fleet. A refusal that can be retried, an error or a timeout is tried again until a deadline, then the step fails.
TimeDispatcherPolicyWhenever a step is due, send it to the machine that owns it, in orderCommandDispatchDue started by the clockAggregateOrderSource: application/usecases/dispatch.go · 0002-material-flow-layout-routing-and-the-command-outbox.md
-
The rack stores a container
The rack controller says the container is in the rack. The registry now knows it there, and the order's store step is done.
Systemasrs-control EventContainerStored PolicyWhenever the rack stores a container, record where it is and finish the store stepCommandOnContainer started by the policyStored AggregateOrderRead model · kept up to dateWhere each container isSource: application/usecases/asrs_facts.go · domain/containertrack/track.go
-
A retrieved container reaches its port
The container waits at the rack's output port. A clean read moves the order on to the next step; a failed read or a wrong container puts the container on hold.
Systemasrs-control EventContainerPresented At Port PolicyWhenever the rack presents a container at a port, read the scan and either go on or hold itCommandOnContainer started by the policyPresented AggregateOrderEventContainerSent To Clarification EventTransportFailed Read model · kept up to dateWhere each container isSource: application/usecases/asrs_facts.go · domain/containertrack/track.go
-
The rack cannot run a job
A container missing from its port, or one the rack finds elsewhere than its map said, goes on hold. A store refused for an equipment fault is planned once more through another input; any other failure ends the transport.
Systemasrs-control EventStorageJob Failed PolicyWhenever a rack job fails, hold the container, re-plan a store once, or end the transportCommandOnStorage started by the policyJob Failed AggregateTrackEventContainerSent To Clarification EventTransportFailed Source: application/usecases/asrs_facts.go · application/usecases/flow.go · domain/containertrack/track.go
-
Remember each rack unit's state
The state of each rack unit is kept for the read views. It does not move the capacity numbers; those come from the capacity fact.
Systemasrs-control EventEquipmentState Changed PolicyWhenever a rack unit changes state, keep the new stateCommandOnEquipment started by the policyState Changed Read model · kept up to dateRack unit states -
Keep the rack's capacity in view
The rack's free units and open jobs are copied into this context's own capacity view. A new capacity is published when a published number moved, and a request for an unavailable machine is refused.
Systemasrs-control EventAsrsCapacity Changed PolicyWhenever the rack's capacity changes, refresh its snapshot and publish it if a number movedCommandOnAsrs started by the policyCapacity Changed AggregateSnapshotEventSubsystemCapacity Changed Read model · kept up to dateSubsystem capacitySource: application/usecases/asrs_facts.go · domain/capacity/capacity.go
-
A robot takes a leg
The robot fleet says which robot carries the leg of an order. The order remembers it, and nothing is published.
Systemamr-fleet- control EventLegAssigned PolicyWhenever the fleet gives a leg to a robot, note which robot has itCommandOnLeg started by the policyAssigned AggregateOrderRead model · kept up to dateWhich robot has each legSource: application/usecases/amr_facts.go · domain/transportorder/legs.go
-
A robot picks up the container
The container is now on the robot. A pickup from a rack output port is confirmed to the rack controller so the port frees up; a pickup from a station frees its slot and lets the next waiting order in.
Systemamr-fleet- control EventContainerPicked Up PolicyWhenever a robot picks up a container, track it on the robot and free the place it leftCommandOnContainer started by the policyPicked Up AggregateOrderRead model · kept up to dateWhere each container isRead model · kept up to dateStation queuesSource: application/usecases/amr_facts.go · domain/stationqueue/queue.go
-
A robot delivers the container
The container is at the end of the leg. The next leg starts, or the transport is complete. At a pick station the arrival is announced first, with the container's place in the queue, then the completion.
Systemamr-fleet- control EventLegCompleted PolicyWhenever a robot drops a container, start the next leg or complete the transportCommandOnLeg started by the policyCompleted AggregateOrderEventContainerArrived At Station EventTransportCompleted Read model · kept up to dateWhere each container isSource: application/usecases/amr_facts.go · application/usecases/flow.go · domain/transportorder/order.go
-
A robot cannot finish its leg
Robot trouble such as a block, a fault or an offline robot is retried a few times. A failed pick or drop, or a container still on the robot, puts the container on hold; anything else ends the transport.
Systemamr-fleet- control EventLegFailed PolicyWhenever a robot leg fails, retry it, hold the container, or end the transportCommandOnLeg started by the policyFailed AggregateOrderEventTransportFailed EventContainerSent To Clarification Source: application/usecases/amr_facts.go · application/usecases/flow.go
-
Keep the fleet's capacity in view
The fleet's robots and open legs are copied into this context's own capacity view and published when a published number moved. A fleet with no robot online makes new requests for it refuse.
Systemamr-fleet- control EventFleetCapacity Changed PolicyWhenever the fleet's capacity changes, refresh its snapshot and publish it if a number movedCommandOnFleet started by the policyCapacity Changed AggregateSnapshotEventSubsystemCapacity Changed Read model · kept up to dateSubsystem capacitySource: application/usecases/amr_facts.go · domain/capacity/capacity.go
-
Cancel a transport
Between steps an order is cancelled at once; a step sent to a machine but not yet picked up asks that machine to stop. With the container on a robot or at a rack output port, the transport cannot be cancelled.
ActorWarehouse execution systemCommandCancelTransport POST /transport-requests/{transportRequestId}/cancellationAggregateOrderEventTransportFailed Source: application/usecases/requests.go · domain/transportorder/order.go
-
Give up on a stalled transport
A step its machine accepted but that shows no progress for too long fails the transport as timed out, and the machine is asked to drop the step. A container left on a robot goes on hold.
TimeStall checkPolicyWhenever a step shows no progress for too long, fail the transport and ask the machine to drop itCommandTickstarted by the clockAggregateOrderEventTransportFailed EventContainerSent To Clarification Source: application/usecases/tick.go · application/usecases/flow.go
-
Let an agent look, not touch
A read-only agent surface shows where a transport stands, where a container is, what waits at a station and how each machine is doing. Nothing can be moved from it.
ActorOperations agentRead modelTransportsRead modelContainer tracksRead modelStation queuesCommandget_transportcalled as an MCP toolSource: adapters/inbound/mcp/tools.go · 0007-observability-and-the-read-only-agentic-surfaces.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 container stored before the topic's retention window and never moved since is unknown here until an operator re-registers it with a put-away.
- Hot spotNothing reads the seven published facts yet: the warehouse execution system pins them in contract tests only, so nobody starts a pick on ContainerArrivedAtStation.
- Hot spotAfter a restart the service takes no request until the backlog of subsystem facts is replayed, so the pod is not ready for as long as that replay takes.
- Hot spotA store refused for an equipment fault is re-planned through another input once; a second failure ends the transport.
Opportunities
- OpportunityA later facility-layout attribute for station buffers would reach this context through a translation layer that fills the same field.
This board is a reconstruction from the code and documentation of material-flow-control at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.