Warehouse management (WMS) · Generic domain · EventStorming board

facility-layout

The warehouse map: sites, zones, aisles and coded location slots, plus the rules for what may legally sit where. Other contexts read it, none write it.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
15
commands
16
policies
29
read models
5
hot spots
5

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
  1. Put a new building on the map

    An operator adds a physical facility under a short site code. Everything else on the map hangs below a site, so this comes first.

    ActorOperator
    CommandRegisterSitePOST /sites
    AggregateSite
    EventSiteRegistered

    Source: application/usecases/register_site.go · domain/site/site.go · domain/shared/events_site.go

  2. Give a site its role in the network

    An operator states what part a site plays in the fulfilment network. Setting the role it already has changes nothing and raises no event.

    ActorOperator
    CommandChangeSiteRolePUT /sites/{siteCode}/role
    AggregateSite
    EventSiteRoleChanged

    Source: application/usecases/change_site_role.go · domain/site/site.go · domain/site/role.go

  3. Declare what a site can send or receive

    An operator says whether a site may donate stock and whether it may receive stock. Every real change publishes a new numbered snapshot; repeating the same values does nothing.

    ActorOperator
    CommandChangeSiteTransferCapabilityPUT /sites/{siteCode}/transfer-capability
    AggregateSite
    EventSiteCapabilityChanged
    Systemnetwork-inventory-planning
    PolicyKeeps a copy of each site's capability; the highest revision wins

    Source: application/usecases/change_site_transfer_capability.go · domain/site/site.go

  4. Add a zone to a site

    An operator adds a zone inside an active site, with one temperature class and a hazmat flag. Other contexts use it to know what kind of area a slot sits in.

    ActorOperator
    Read modelSite (must exist and be active)
    CommandRegisterZonePOST /sites/{siteCode}/zones
    AggregateZone
    EventZoneRegistered
    Systeminventory-storage
    PolicyKeeps the zone's hazmat and temperature class to check stows
    Systemdock-scheduling
    PolicyKeeps which site a zone belongs to, so a door knows its site
    Systemyard-management
    PolicyKeeps the zone so yard spots and doors resolve to a site
    Systemoutbound-shipping
    PolicyKeeps the zone for its copy of staging locations
    Systemslotting-optimization
    PolicyKeeps a copy of the layout
    Systempick-face-replenishment
    PolicyKeeps a copy of the layout
    Systemtask-interleaving
    PolicyKeeps a copy of the layout

    Source: application/usecases/register_zone.go · domain/zone/zone.go · domain/shared/events.go

  5. Add an aisle to a zone

    An operator adds a corridor to an active zone, with its place in the walking order and whether it is one-way or two-way.

    ActorOperator
    Read modelZone (must exist and be active)
    CommandRegisterAislePOST /zones/{zoneId}/aisles
    AggregateAisle
    EventAisleRegistered

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

  6. Define a kind of slot

    An operator defines a reusable slot type such as a pallet rack, with its role (storage, dock, yard, work centre and others) and, where the role needs it, weight and volume limits.

    ActorOperator
    CommandRegisterLocationTypePOST /location-types
    AggregateLocationType
    EventLocationTypeRegistered

    Source: application/usecases/register_location_type.go · domain/placement/placement.go · domain/placement/role.go

  7. Say which slot kinds are allowed where

    An operator declares that a slot type is allowed or denied in the zones that match a condition, such as frozen zones. The rule is applied later, when each slot is registered.

    ActorOperator
    Read modelLocation types
    CommandDefinePlacementRulePOST /placement-rules
    AggregatePlacementRule
    EventPlacementRuleDefined

    Source: application/usecases/define_placement_rule.go · domain/placement/placement.go · domain/placement/rules.go

  8. Register one location slot

    An operator registers a coded slot. It is refused if its site, zone or aisle is missing or retired, or if a placement rule forbids that slot type in that zone.

    ActorOperator
    Read modelSite, zone and aisle
    Read modelLocation types
    Read modelPlacement rules
    CommandRegisterLocationSlotPOST /locations
    AggregateLocationSlot
    EventLocationSlotRegistered
    Systeminbound-receiving
    PolicyKeeps inbound dock doors, ignores every other slot
    Systemdock-scheduling
    PolicyKeeps the slot; only dock doors can be booked
    Systemyard-management
    PolicyKeeps yard spots and dock doors, ignores the rest
    Systemoutbound-shipping
    PolicyKeeps its copy of staging locations
    Systeminventory-storage
    PolicyKeeps the slot with its zone, hazmat and temperature class
    Systemwarehouse-planning
    PolicyCounts storage positions and work stations
    Systemslotting-optimization
    PolicyKeeps a copy of the layout
    Systempick-face-replenishment
    PolicyKeeps a copy of the layout
    Systemtask-interleaving
    PolicyKeeps a copy of the layout

    Source: application/usecases/register_location_slot.go · domain/slot/location_slot.go · domain/placement/rules.go

  9. Load a whole building at once

    An operator submits a table of slots. Missing sites, zones and aisles are created on the way and each row succeeds or fails alone. One summary says how many rows went in.

    ActorOperator
    Read modelLocation types
    Read modelPlacement rules
    CommandImportFacilityLayoutPOST /location-imports
    AggregateLocationSlot
    EventLocationSlotRegistered
    EventLocationGeometryUpdated
    EventFacilityLayoutImported

    Source: application/usecases/import_facility_layout.go · domain/slot/location_slot.go

  10. Declare how a slot is handled

    An operator says whether a slot takes single items, cases or pallets. The slot must exist and must not be retired.

    ActorOperator
    CommandDeclareLocationHandlingUnitPUT /locations/{locationCode}/handling-unit
    AggregateLocationSlot
    EventLocationSlotHandlingUnitDeclared
    Systeminventory-storage
    PolicySets the bin's handling unit in its copy; the last write wins

    Source: application/usecases/declare_location_handling_unit.go · domain/slot/location_slot.go

  11. Pin a slot to the floor plan

    An operator records where a slot sits and how big it is, in metres. Distance questions then use real positions instead of an estimate.

    ActorOperator
    CommandSetLocationGeometryPUT /locations/{locationCode}/geometry
    AggregateLocationSlot
    EventLocationGeometryUpdated
    Systemtask-interleaving
    PolicyKeeps the slot's position in its copy of the layout

    Source: application/usecases/set_location_geometry.go · domain/slot/location_slot.go

  12. Draw an aisle's walking line

    An operator sets the centreline along which an aisle is walked. The travel graph uses it for measured distances.

    ActorOperator
    CommandSetAisleGeometryPUT /zones/{zoneId}/aisles/{aisleCode}/geometry
    AggregateAisle
    EventAisleGeometryUpdated

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

  13. Connect two aisles

    An operator declares that two aisles of the same zone can be crossed at a given bay. Walking distances can then go from one aisle to the other.

    ActorOperator
    CommandRegisterCrossAislePOST /zones/{zoneId}/cross-aisles
    AggregateCrossAisle
    EventCrossAisleRegistered

    Source: application/usecases/register_cross_aisle.go · domain/aisle/cross_aisle.go

  14. Record a wall or other fixed structure

    An operator records a wall, column, office or conveyor on a site, so a floor plan can be drawn to scale. It is not a place where stock can sit.

    ActorOperator
    CommandRegisterFixedStructurePOST /sites/{siteCode}/structures
    AggregateFixedStructure
    EventFixedStructureRegistered

    Source: application/usecases/register_fixed_structure.go · domain/structure/fixed_structure.go

  15. Keep site capability facts fresh

    A site's capability is only published when it changes, so a reader would see it age out. On a fixed interval the context republishes each active site's current values as a new revision.

    TimeCapability heartbeat
    PolicyEvery interval, republish the current capability of each active site that has declared one
    CommandPublishSiteCapabilityHeartbeatsstarted by the clock
    AggregateSite
    EventSiteCapabilityChanged
    Systemnetwork-inventory-planning
    PolicyKeeps the site's capability copy fresh instead of letting it go stale

    Source: application/usecases/publish_site_capability_heartbeats.go · adapters/inbound/heartbeat/heartbeat.go · adr/0041-site-capability-heartbeat.md

  16. Retire a slot for good

    An operator permanently retires a slot. There is no way back, and its code is never reused. Other contexts stop offering it for new work.

    ActorOperator
    CommandDecommissionLocationSlotPOST /locations/{locationCode}/decommissionings
    AggregateLocationSlot
    EventLocationSlotDecommissioned
    Systeminbound-receiving
    PolicyRemoves the door from its dock-door list
    Systemdock-scheduling
    PolicyRemoves the door, so no new bookings; existing ones stay
    Systemyard-management
    PolicyMarks the slot retired in its copy
    Systeminventory-storage
    PolicyStops offering the location for new stows
    Systemwarehouse-planning
    PolicyTakes the slot out of its storage count
    Systemslotting-optimization
    PolicyRetires the slot in its copy of the layout
    Systempick-face-replenishment
    PolicyRetires the slot in its copy of the layout
    Systemtask-interleaving
    PolicyRetires the slot in its copy of the layout

    Source: application/usecases/decommission_location_slot.go · domain/slot/location_slot.go · adr/0005-one-way-decommission.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 facility-layout at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.