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.
- events published
- 15
- commands
- 16
- policies
- 29
- 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 eventSite
Registered - Pivotal eventZone
Registered - Pivotal eventAisle
Registered - Pivotal eventLocation
Slot Registered - Pivotal eventLocation
Slot Decommissioned
Listens to (0): contexts whose events this one reacts to
none
Tells (10): contexts that react to its events
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
-
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.
ActorOperatorCommandRegisterSite POST /sitesAggregateSiteEventSiteRegistered Source: application/usecases/register_site.go · domain/site/site.go · domain/shared/events_site.go
-
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.
ActorOperatorCommandChangeSite PUT /sites/{siteCode}/roleRole AggregateSiteEventSiteRole Changed Source: application/usecases/change_site_role.go · domain/site/site.go · domain/site/role.go
-
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.
ActorOperatorCommandChangeSite PUT /sites/{siteCode}/transfer-capabilityTransfer Capability AggregateSiteEventSiteCapability Changed Systemnetwork-inventory- planning PolicyKeeps a copy of each site's capability; the highest revision winsSource: application/usecases/change_site_transfer_capability.go · domain/site/site.go
-
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.
ActorOperatorRead modelSite (must exist and be active)CommandRegisterZone POST /sites/{siteCode}/zonesAggregateZoneEventZoneRegistered Systeminventory-storage PolicyKeeps the zone's hazmat and temperature class to check stowsSystemdock-scheduling PolicyKeeps which site a zone belongs to, so a door knows its siteSystemyard-management PolicyKeeps the zone so yard spots and doors resolve to a siteSystemoutbound-shipping PolicyKeeps the zone for its copy of staging locationsSystemslotting-optimization PolicyKeeps a copy of the layoutSystempick-face- replenishment PolicyKeeps a copy of the layoutSystemtask-interleaving PolicyKeeps a copy of the layoutSource: application/usecases/register_zone.go · domain/zone/zone.go · domain/shared/events.go
-
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.
ActorOperatorRead modelZone (must exist and be active)CommandRegisterAisle POST /zones/{zoneId}/aislesAggregateAisleEventAisleRegistered Source: application/usecases/register_aisle.go · domain/aisle/aisle.go
-
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.
ActorOperatorCommandRegisterLocation POST /location-typesType AggregateLocationType EventLocationType Registered Source: application/usecases/register_location_type.go · domain/placement/placement.go · domain/placement/role.go
-
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.
ActorOperatorRead modelLocation typesCommandDefinePlacement POST /placement-rulesRule AggregatePlacementRule EventPlacementRule Defined Source: application/usecases/define_placement_rule.go · domain/placement/placement.go · domain/placement/rules.go
-
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.
ActorOperatorRead modelSite, zone and aisleRead modelLocation typesRead modelPlacement rulesCommandRegisterLocation POST /locationsSlot AggregateLocationSlot EventLocationSlot Registered Systeminbound-receiving PolicyKeeps inbound dock doors, ignores every other slotSystemdock-scheduling PolicyKeeps the slot; only dock doors can be bookedSystemyard-management PolicyKeeps yard spots and dock doors, ignores the restSystemoutbound-shipping PolicyKeeps its copy of staging locationsSysteminventory-storage PolicyKeeps the slot with its zone, hazmat and temperature classSystemwarehouse-planning PolicyCounts storage positions and work stationsSystemslotting-optimization PolicyKeeps a copy of the layoutSystempick-face- replenishment PolicyKeeps a copy of the layoutSystemtask-interleaving PolicyKeeps a copy of the layoutSource: application/usecases/register_location_slot.go · domain/slot/location_slot.go · domain/placement/rules.go
-
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.
ActorOperatorRead modelLocation typesRead modelPlacement rulesCommandImportFacility POST /location-importsLayout AggregateLocationSlot EventLocationSlot Registered EventLocationGeometry Updated EventFacilityLayout Imported Source: application/usecases/import_facility_layout.go · domain/slot/location_slot.go
-
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.
ActorOperatorCommandDeclareLocation PUT /locations/{locationCode}/handling-unitHandling Unit AggregateLocationSlot EventLocationSlot Handling Unit Declared Systeminventory-storage PolicySets the bin's handling unit in its copy; the last write winsSource: application/usecases/declare_location_handling_unit.go · domain/slot/location_slot.go
-
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.
ActorOperatorCommandSetLocation PUT /locations/{locationCode}/geometryGeometry AggregateLocationSlot EventLocationGeometry Updated Systemtask-interleaving PolicyKeeps the slot's position in its copy of the layoutSource: application/usecases/set_location_geometry.go · domain/slot/location_slot.go
-
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.
ActorOperatorCommandSetAisle PUT /zones/{zoneId}/aisles/{aisleCode}/geometryGeometry AggregateAisleEventAisleGeometry Updated Source: application/usecases/set_aisle_geometry.go · domain/aisle/aisle.go
-
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.
ActorOperatorCommandRegisterCross POST /zones/{zoneId}/cross-aislesAisle AggregateCrossAisle EventCrossAisle Registered Source: application/usecases/register_cross_aisle.go · domain/aisle/cross_aisle.go
-
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.
ActorOperatorCommandRegisterFixed POST /sites/{siteCode}/structuresStructure AggregateFixedStructure EventFixedStructure Registered Source: application/usecases/register_fixed_structure.go · domain/structure/fixed_structure.go
-
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 heartbeatPolicyEvery interval, republish the current capability of each active site that has declared oneCommandPublishSite started by the clockCapability Heartbeats AggregateSiteEventSiteCapability Changed Systemnetwork-inventory- planning PolicyKeeps the site's capability copy fresh instead of letting it go staleSource: application/usecases/publish_site_capability_heartbeats.go · adapters/inbound/heartbeat/heartbeat.go · adr/0041-site-capability-heartbeat.md
-
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.
ActorOperatorCommandDecommissionLocation POST /locations/{locationCode}/decommissioningsSlot AggregateLocationSlot EventLocationSlot Decommissioned Systeminbound-receiving PolicyRemoves the door from its dock-door listSystemdock-scheduling PolicyRemoves the door, so no new bookings; existing ones staySystemyard-management PolicyMarks the slot retired in its copySysteminventory-storage PolicyStops offering the location for new stowsSystemwarehouse-planning PolicyTakes the slot out of its storage countSystemslotting-optimization PolicyRetires the slot in its copy of the layoutSystempick-face- replenishment PolicyRetires the slot in its copy of the layoutSystemtask-interleaving PolicyRetires the slot in its copy of the layoutSource: 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.
- Hot spotRetiring is one-way and nothing can set a structure to 'under maintenance'. A mistaken retirement cannot be undone through the API.
- Hot spotDistance between two zones with no recorded positions is refused with an error, not estimated. The ADR calls this the point most likely to be revisited.
- Hot spotFixed structures are stored and published, but the travel graph does not yet treat them as obstacles.
- Hot spotCross-aisle distances are always estimated from the aisles' spacing. The walkway's own geometry is left to a later phase.
Source: internal/domain/travel/graph.go
- Hot spotAisle lines, cross-aisles and fixed structures are published but nobody consumes them yet.
Source: docs/ddd/domain-events.md
Opportunities
- OpportunityWork-planning contexts could ask for travel distances through a future lookup port. The ADR leaves this as a separate decision.
- OpportunityA to-scale floor plan mixing zones with and without geometry is deferred until a consumer needs printed floor plans.
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.