Warehouse execution (WES) · Generic domain · EventStorming board
asrs-control
Controls the automated storage rack: one job per aisle at a time over PLC messages, placing every container and publishing the facts the flow upstairs needs.
- events published
- 15
- commands
- 11
- policies
- 18
- read models
- 5
- hot spots
- 5
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventContainer
Stored - Pivotal eventContainer
Presented At Port - Pivotal eventStorage
Job Failed - Pivotal eventEquipment
State Changed - Pivotal eventAsrs
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
14 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 store into the rack
The warehouse control system asks to store the container waiting on an input port. The aisle's rack map picks and reserves a place at once - front for fast movers, back for slow - and refuses a container that is already in or already busy.
ActorMaterial flow controlRead modelFree rack positionsRead modelHow often the container movesCommandRequestStore POST /asrs/{asrsId}/storage-jobsAggregateMapSource: application/usecases/requests.go · domain/storagemap/assign.go
-
Request a retrieve from the rack
The warehouse control system names a stored container and an output port. An unknown container, or one already on its way, is refused; otherwise the job waits in its aisle's queue.
ActorMaterial flow controlRead modelWhere each container sitsCommandRequestRetrieve POST /asrs/{asrsId}/storage-jobsAggregateMapSource: application/usecases/requests.go · domain/storagemap/map.go
-
Give the aisle its next job
One job at a time per aisle. When the equipment finishes, the next store or retrieve is sent to it; when a front container blocks the one needed, an invisible shuffle clears the way first.
Event · earlierJOB_DONEPolicyWhenever a job ends or a new one is accepted, the aisle's unit takes one next jobCommandDispatchNext started by the policyJob AggregateUnitEventSTOREanalytics stream onlyEventRETRIEVEanalytics stream onlyEventMOVEanalytics stream onlySystem · outsideAS/RS equipment (PLC)PolicyReceives one job at a time and moves the containerSource: application/usecases/schedule.go · domain/scheduling/next.go · domain/equipment/unit.go
-
The equipment finishes a store
The equipment answers that the motion is done. The container now sits in its reserved place, the finished-job answer is acknowledged so it never repeats, and the fact is published for the material flow system designed to read it.
System · outsideAS/RS equipment (PLC)EventJOB_DONEPolicyWhenever the equipment reports a finished motion, record it and acknowledge the answerCommandHandleUp started by the policyAggregateJobEventJOB_DONEanalytics stream onlyEventACKanalytics stream onlyEventContainerStored Systemmaterial-flow- control PolicyRecords the container in the rack and finishes the store stepSource: application/usecases/uplink.go · domain/storagejob/transitions.go
-
The container arrives at the port
A retrieved container reaches its output port in request order. What the port read is recorded - a clean read, a no-read or a mismatch - and the presentation is published so someone can come and take it.
System · outsideAS/RS equipment (PLC)EventPORT_ARRIVALPolicyWhenever a container arrives at an output port, present the oldest retrieve waiting for itCommandHandleUp started by the policyAggregateJobEventPORT_ARRIVALanalytics stream onlyEventContainerPresented At Port Systemmaterial-flow- control PolicyReads the scan and moves the order on, or holds the containerSource: application/usecases/uplink.go · domain/storagejob/transitions.go
-
The equipment cannot run a job
The equipment answers that a job cannot run: the container was not where the rack map said, the port was busy, or a fault. Each bare code becomes a plain failure reason and the job ends.
System · outsideAS/RS equipment (PLC)EventJOB_FAILEDPolicyWhenever the equipment fails a job, end it with the mapped reasonCommandHandleUp started by the policyAggregateJobEventJOB_FAILEDanalytics stream onlyEventStorageJob Failed Systemmaterial-flow- control PolicyHolds the container, re-plans a store once, or ends the transportSource: application/usecases/uplink.go · domain/storagejob/transitions.go
-
An aisle unit stops
The equipment reports each aisle unit's state. A unit that changed state is published; a held unit fails every job still waiting in its aisle with an equipment fault and takes no new work until it clears.
System · outsideAS/RS equipment (PLC)EventUNIT_STATEPolicyWhenever a unit reports a new state, publish it; a held aisle loses its queued jobsCommandHandleUp started by the policyAggregateUnitEventUNIT_STATEanalytics stream onlyEventEquipmentState Changed EventStorageJob Failed Systemmaterial-flow- control PolicyKeeps the unit's state; a store refused for the fault is re-planned once, else the transport endsSource: application/usecases/uplink.go · domain/equipment/unit.go
-
Cancel a job
The warehouse control system cancels a job. One still waiting is simply dropped; one already with the equipment asks it to stop, and its answer decides the outcome.
ActorMaterial flow controlCommandCancelPOST /asrs/{asrsId}/storage-jobs/{storageJobId}/cancellationAggregateJobEventCANCELanalytics stream onlyEventStorageJob Failed System · outsideAS/RS equipment (PLC)PolicyEnds the transport as cancelled when it asked for the cancellationSource: application/usecases/commands.go · domain/storagejob/transitions.go
-
The equipment answers a stop request
An accepted stop ends the job as cancelled and frees what it held. A refused or never-answered stop lets the job run on, back to where it was before the request.
System · outsideAS/RS equipment (PLC)EventACKPolicyWhenever the equipment answers a stop request, end the job or let it go onCommandHandleAck started by the policyAggregateJobEventStorageJob Failed Systemmaterial-flow- control PolicyEnds the transport as cancelled when it asked for the stopSource: application/usecases/acks.go
-
Give up on silent equipment
A command the equipment never acknowledges is resent three times, then its job fails as unreachable. A stop request that stays unanswered is called off, so the aisle is never left waiting on nothing.
TimeRetransmit timerPolicyAfter three unanswered retries, a command fails its job; an unanswered stop is called offCommandHandleExpired started by the clockAggregateJobEventStorageJob Failed Systemmaterial-flow- control PolicyRe-plans a store once through another input, else ends the transportSource: application/usecases/acks.go · 0002-telegram-conformance-and-aisle-scheduling.md
-
Recover after a restart
After a restart, every command the equipment never acknowledged is resent unchanged, pending stops too, and every aisle unit is asked to report its state before the aisles carry on.
TimeBoot recoveryPolicyAt boot, resend everything unanswered and ask every unit its stateCommandRecoverstarted by the clockAggregateJobEventSTATE_REQUESTanalytics stream onlySource: application/usecases/recover.go · 0002-telegram-conformance-and-aisle-scheduling.md
-
Confirm the container was taken
No message from the equipment ever says a container left an output port, so the taker confirms the pickup. The port becomes free and the next retrieve can be presented on it.
ActorMaterial flow controlCommandConfirmPickup POST /asrs/{asrsId}/ports/{portId}/pickupsAggregateMapSource: application/usecases/commands.go · domain/storagemap/motion.go
-
Publish what the AS/RS can do
Every change renews the whole system's numbers - units available, free places, open jobs - and the new capacity is published for the flow control designed to read it.
Event · earlierContainerStored PolicyWhenever an aisle's numbers move, publish the AS/RS's capacityCommandRefreshCapacity started by the policyAggregateSnapshotEventAsrsCapacity Changed Systemmaterial-flow- control PolicyRefreshes the rack's capacity and republishes it if a number movedSource: application/usecases/aisle.go · domain/capacity/capacity.go
-
Let an agent look, not touch
A read-only agent surface answers where a job stands, what waits on each port and how full the system is - without touching the material flow. Nothing can be changed from it.
ActorOperations agentRead modelAS/RS stateRead modelStorage jobsCommandListJobs called as an MCP toolSource: application/usecases/list_jobs.go · 0005-read-only-mcp-server-and-a2a-agent.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 finished-job answer lost while the service was down leaves the job stuck as acknowledged; protocol v1 has no way to ask the equipment what became of it.
Source: adr/0002-telegram-conformance-and-aisle-scheduling.md
- Hot spotA stop the equipment accepted whose answer (and its retries) are all lost leaves the job waiting forever: the aisle stays busy and the place stays reserved.
Source: adr/0002-telegram-conformance-and-aisle-scheduling.md
- Hot spotWhen the rack disagrees with the stored map, the job fails as a mismatch but the offending position is not blocked, so the next job can hit it again.
Source: adr/0002-telegram-conformance-and-aisle-scheduling.md
- Hot spotOnly the material flow controller reads the five published facts. Fault cases for equipment faults, and any other reader, are designed, not built.
- Hot spotA retrieve to a port whose earlier pickup was never confirmed replaces the container still waiting on it; the overlap is only logged.
Opportunities
- OpportunityThe analytics twin of every fact has no reader yet; it is kept as the fleet's analytics data slot.
This board is a reconstruction from the code and documentation of asrs-control at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.