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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

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.

  1. Pivotal eventContainerStored
  2. Pivotal eventContainerPresentedAtPort
  3. Pivotal eventStorageJobFailed
  4. Pivotal eventEquipmentStateChanged
  5. Pivotal eventAsrsCapacityChanged

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
  1. 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 control
    Read modelFree rack positions
    Read modelHow often the container moves
    CommandRequestStorePOST /asrs/{asrsId}/storage-jobs
    AggregateMap

    Source: application/usecases/requests.go · domain/storagemap/assign.go

  2. 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 control
    Read modelWhere each container sits
    CommandRequestRetrievePOST /asrs/{asrsId}/storage-jobs
    AggregateMap

    Source: application/usecases/requests.go · domain/storagemap/map.go

  3. 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_DONE
    PolicyWhenever a job ends or a new one is accepted, the aisle's unit takes one next job
    CommandDispatchNextJobstarted by the policy
    AggregateUnit
    EventSTOREanalytics stream only
    EventRETRIEVEanalytics stream only
    EventMOVEanalytics stream only
    System · outsideAS/RS equipment (PLC)
    PolicyReceives one job at a time and moves the container

    Source: application/usecases/schedule.go · domain/scheduling/next.go · domain/equipment/unit.go

  4. 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_DONE
    PolicyWhenever the equipment reports a finished motion, record it and acknowledge the answer
    CommandHandleUpstarted by the policy
    AggregateJob
    EventJOB_DONEanalytics stream only
    EventACKanalytics stream only
    EventContainerStored
    Systemmaterial-flow-control
    PolicyRecords the container in the rack and finishes the store step

    Source: application/usecases/uplink.go · domain/storagejob/transitions.go

  5. 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_ARRIVAL
    PolicyWhenever a container arrives at an output port, present the oldest retrieve waiting for it
    CommandHandleUpstarted by the policy
    AggregateJob
    EventPORT_ARRIVALanalytics stream only
    EventContainerPresentedAtPort
    Systemmaterial-flow-control
    PolicyReads the scan and moves the order on, or holds the container

    Source: application/usecases/uplink.go · domain/storagejob/transitions.go

  6. 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_FAILED
    PolicyWhenever the equipment fails a job, end it with the mapped reason
    CommandHandleUpstarted by the policy
    AggregateJob
    EventJOB_FAILEDanalytics stream only
    EventStorageJobFailed
    Systemmaterial-flow-control
    PolicyHolds the container, re-plans a store once, or ends the transport

    Source: application/usecases/uplink.go · domain/storagejob/transitions.go

  7. 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_STATE
    PolicyWhenever a unit reports a new state, publish it; a held aisle loses its queued jobs
    CommandHandleUpstarted by the policy
    AggregateUnit
    EventUNIT_STATEanalytics stream only
    EventEquipmentStateChanged
    EventStorageJobFailed
    Systemmaterial-flow-control
    PolicyKeeps the unit's state; a store refused for the fault is re-planned once, else the transport ends

    Source: application/usecases/uplink.go · domain/equipment/unit.go

  8. 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 control
    CommandCancelPOST /asrs/{asrsId}/storage-jobs/{storageJobId}/cancellation
    AggregateJob
    EventCANCELanalytics stream only
    EventStorageJobFailed
    System · outsideAS/RS equipment (PLC)
    PolicyEnds the transport as cancelled when it asked for the cancellation

    Source: application/usecases/commands.go · domain/storagejob/transitions.go

  9. 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)
    EventACK
    PolicyWhenever the equipment answers a stop request, end the job or let it go on
    CommandHandleAckstarted by the policy
    AggregateJob
    EventStorageJobFailed
    Systemmaterial-flow-control
    PolicyEnds the transport as cancelled when it asked for the stop

    Source: application/usecases/acks.go

  10. 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 timer
    PolicyAfter three unanswered retries, a command fails its job; an unanswered stop is called off
    CommandHandleExpiredstarted by the clock
    AggregateJob
    EventStorageJobFailed
    Systemmaterial-flow-control
    PolicyRe-plans a store once through another input, else ends the transport

    Source: application/usecases/acks.go · 0002-telegram-conformance-and-aisle-scheduling.md

  11. 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 recovery
    PolicyAt boot, resend everything unanswered and ask every unit its state
    CommandRecoverstarted by the clock
    AggregateJob
    EventSTATE_REQUESTanalytics stream only

    Source: application/usecases/recover.go · 0002-telegram-conformance-and-aisle-scheduling.md

  12. 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 control
    CommandConfirmPickupPOST /asrs/{asrsId}/ports/{portId}/pickups
    AggregateMap

    Source: application/usecases/commands.go · domain/storagemap/motion.go

  13. 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 capacity
    CommandRefreshCapacitystarted by the policy
    AggregateSnapshot
    EventAsrsCapacityChanged
    Systemmaterial-flow-control
    PolicyRefreshes the rack's capacity and republishes it if a number moved

    Source: application/usecases/aisle.go · domain/capacity/capacity.go

  14. 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 agent
    Read modelAS/RS state
    Read modelStorage jobs
    CommandListJobscalled as an MCP tool

    Source: 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.

Opportunities

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.