Warehouse execution (WES) · Generic domain · EventStorming board
amr-fleet-control
Drives the robot fleet: gives each transport leg to the nearest free robot, keeps robots apart on a shared map, and publishes seven facts about what happened.
- events published
- 7
- commands
- 11
- policies
- 16
- read models
- 9
- hot spots
- 4
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventLeg
Assigned - Pivotal eventContainer
Picked Up - Pivotal eventLeg
Completed - Pivotal eventLeg
Failed - Pivotal eventFleet
Capacity Changed
Listens to (0): contexts whose events this one reacts to
none
Tells (1): contexts that react to its events
The board, row by row
13 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
-
Request a transport leg
The material flow controller names a container and two handoff points. A leg to an unknown or unreachable point, for a container already moving, or while no robot is online, is refused at once; otherwise it waits for a robot.
ActorMaterial flow controlRead modelHandoff points on the mapRead modelRobots onlineCommandRequestLeg POST /fleets/{fleetId}/legsAggregateMissionSource: application/usecases/legs.go · domain/mission/mission.go
-
Give a waiting leg to the nearest robot
Whenever a leg is waiting and a robot is free, the nearest one by route length gets it, with its battery and key as tie-breakers. Its first stretch of road is reserved and the order goes out over the robot link.
Event · earlierRobotState Changed PolicyWhenever a leg waits and a robot is free, the nearest assignable robot takes the next leg in acceptance orderRead modelRobots and their batteryRead modelReserved nodes and edgesCommandAssignLeg started by the policyAggregateMissionEventLegAssigned Systemmaterial-flow- control PolicyNotes which robot carries the legSource: application/usecases/traffic.go · domain/dispatch/dispatch.go · domain/mission/transitions.go
-
The robot picks up the container
The robot reports that its pick action finished at the leg's start point. The leg is now carrying the container and the fact is published.
System · outsideRobot (VDA 5050)EventState reportPolicyWhenever a robot reports its pick action finished, the leg becomes picked upCommandHandleState started by the policyAggregateMissionEventContainerPicked Up Systemmaterial-flow- control PolicyMoves the container onto the robot; confirms the pickup at an AS/RS output port or frees a station slotSource: application/usecases/uplink.go · domain/mission/transitions.go
-
The robot drops the container
The robot reports that its drop action finished at the leg's end point. The leg is complete, the robot is free again and the fact is published.
System · outsideRobot (VDA 5050)EventState reportPolicyWhenever a robot reports its drop action finished, the leg is completedCommandHandleState started by the policyAggregateMissionEventLegCompleted Systemmaterial-flow- control PolicyRecords the container at its destination; starts the next leg or completes the transportSource: application/usecases/uplink.go · domain/mission/transitions.go
-
A robot cannot finish its leg
A robot rejects the order, fails to pick or drop, or reports a fatal fault. The leg ends with one plain reason, and says whether the container is still on the robot.
System · outsideRobot (VDA 5050)EventState reportPolicyWhenever a robot reports a failed action, a rejected order or a fatal error, the leg fails with that reasonCommandHandleState started by the policyAggregateMissionEventLegFailed Systemmaterial-flow- control PolicyRetries the leg for robot trouble, or puts the container on hold and ends the transportSource: application/usecases/uplink.go · domain/mission/transitions.go
-
Cancel a transport leg
The material flow controller cancels a leg. One still waiting for a robot is cancelled at once; one already with a robot asks the robot to cancel its order, and the robot's answer ends the leg.
ActorMaterial flow controlCommandCancelLeg POST /fleets/{fleetId}/legs/{legId}/cancellationAggregateMissionEventLegFailed Systemmaterial-flow- control PolicyMarks the transport cancelled once the leg endsSource: application/usecases/legs.go · domain/mission/transitions.go
-
Give up on a silent or stuck robot
A robot that stays silent, held or blocked too long loses its leg, and so does an order the robot never answers after its resends. Each ends with its own reason, so the controller can tell a retry from a real fault.
TimeOne-second tickPolicyWhenever a robot is stopped or held too long, or an order stays unanswered, fail its legCommandTickstarted by the clockAggregateMissionEventLegFailed Source: application/usecases/tick.go · domain/mission/transitions.go
-
Recover after a restart
At boot, every open leg made on an older map version fails as retired, and every robot is asked for its state at once before the fleet carries on.
TimeBoot recoveryPolicyAt boot, fail legs of a retired map and ask every robot for its stateCommandRecoverstarted by the clockAggregateMissionEventLegFailed Source: application/usecases/tick.go · 0002-vda5050-v3-conformance-map-and-traffic-control.md
-
A robot changes state
Each robot's connection and state reports are folded into one view: online, stopped, held, charging. A change is published; nothing in the fleet reads it yet.
System · outsideRobot (VDA 5050)EventConnection messagePolicyWhenever a robot's state or connection changes, publish the changeCommandHandleConnection started by the policyAggregateRobotEventRobotState Changed Read model · kept up to dateRobot registrySource: application/usecases/uplink.go · domain/robot/robot.go
-
Two robots wait on each other
When robots wait for nodes in a circle, the cycle is published once and the youngest leg is re-routed around the nodes others hold. A cycle that lasts too long fails that leg as blocked.
TimeFleet scheduling passPolicyWhenever robots wait on each other in a circle, report it once and re-route the youngest legRead modelWho waits for which nodeCommandDetectDeadlocks started by the clockAggregateFleetMap EventDeadlockDetected Source: application/usecases/traffic.go · domain/fleetmap/deadlock.go
-
Charge and park idle robots
An idle robot below the charge threshold drives to the nearest free charger and charges up; an idle robot off a parking spot drives to the nearest free one. These trips publish nothing.
Event · earlierRobotState Changed PolicyWhenever an idle robot is low on battery or off a parking spot, send it to the nearest free charger or parking nodeCommandChargeAnd started by the policyPark AggregateMissionSource: application/usecases/traffic.go · 0002-vda5050-v3-conformance-map-and-traffic-control.md
-
Publish what the fleet can do
Every change of robots, queued legs or active legs renews the fleet's numbers. The new capacity is published only when a number actually moved.
Event · earlierLegCompleted PolicyWhenever a count changes, publish the fleet's capacityCommandRefreshCapacity started by the policyAggregateSnapshotEventFleetCapacity Changed Systemmaterial-flow- control PolicyRefreshes its view of how much the fleet can takeSource: application/usecases/fleet.go · domain/capacity/capacity.go
-
Let an agent look, not touch
A read-only agent surface answers what the fleet looks like, which legs are open and where a robot is. It cannot request or cancel a leg; an agent that must move a container asks the material flow controller.
ActorOperations agentRead modelFleetRead modelOpen legsRead modelRobotsCommandget_fleetcalled as an MCP toolSource: adapters/inbound/mcp/server.go · 0006-read-only-mcp-and-a2a-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 spotNothing reads RobotStateChanged or DeadlockDetected yet: the exception manager is named as the reader of deadlocks, but it consumes none of this fleet's facts.
- Hot spotThe map is a file loaded at boot. The building's travel graph carries no coordinates and no event announces it, so a connection to facility layout waits.
Source: adr/0002-vda5050-v3-conformance-map-and-traffic-control.md
- Hot spotA rejection reported on a full list of 50 errors is not seen; that order stays unanswered until the resend limit fails it, about 20 seconds later.
Source: adr/0002-vda5050-v3-conformance-map-and-traffic-control.md
- Hot spotRobots are discovered, not registered: any robot on the broker's topics joins the fleet.
Source: adr/0002-vda5050-v3-conformance-map-and-traffic-control.md
Opportunities
- OpportunityRead the map from facility layout through a translation layer once that context registers ports, stations and coordinates.
Source: adr/0002-vda5050-v3-conformance-map-and-traffic-control.md
This board is a reconstruction from the code and documentation of amr-fleet-control at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.