Warehouse execution (WES) · Core domain · EventStorming board
fulfillment-execution
Runs work on the floor: tasks wait in a pool, stations claim and complete them, and picked orders are packed, weigh-checked and manifested.
- events published
- 18
- commands
- 12
- policies
- 20
- read models
- 6
- hot spots
- 5
The story in 4 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventTask
Available - Pivotal eventTask
Claimed - Pivotal eventTask
Completed - Pivotal eventPackage
Manifested
Listens to (4): contexts whose events this one reacts to
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
-
Create a task from released work
wes-work-planning releases a unit of work. A task is created once per release, from the process path catalogue, and put in the pool for stations to claim. A task with a known location is announced to the pool.
Systemwes-work- planning EventWorkReleased PolicyWhenever work is released, create a task for it from the process path catalogueRead modelProcess path catalogueCommandCreateTask started by the policyAggregateTaskEventTaskCreated analytics stream onlyEventTaskAvailable Systemtask-interleaving PolicyLearns of the open task, so it can advise stations what to work nextSource: application/usecases/consume_work_released.go · application/usecases/create_task.go · domain/task/task.go
-
Keep the product handling copy
Sealing a package checks that the hazard classes of its items can travel together. The classes come from a copy of product-master's classification, so sealing never calls out. An unclassified item never blocks.
Systemproduct-master EventProductClassified PolicyWhenever a SKU is classified, keep the classification if its version is newerCommandApplyProduct started by the policyClassified Read model · kept up to dateClassification copySource: application/usecases/apply_product_classified.go · adapters/inbound/kafka/product_classified_consumer.go · adr/0039-product-classification-local-copy.md
-
Keep the pack levels copy
A pick scan is checked against the packs product-master declares. Each and case barcodes resolve to a SKU and a number of units. Retired levels are kept as ended.
Systemproduct-master EventProductPack Level Declared PolicyWhenever a pack level is declared or retired, update the pack viewCommandApplyPack started by the policyLevel Read model · kept up to datePack view (GTINs)Source: application/usecases/apply_pack_level.go · adapters/inbound/kafka/pack_level_consumer.go · adr/0054-case-and-each-pick-scans-and-break-case-task.md
-
Claim the next task
A station asks for work and is given the best-fitting pending task, on a lease so that only one station holds it. Advice from task-interleaving only breaks ties inside a priority band.
ActorStation operatorRead modelQueue depthRead modelInterleaving hintsCommandClaimNext POST /stations/{stationId}/task-claimsAggregateTaskEventTaskClaimed EventTaskClaimed Systemtask-interleaving PolicyMarks the task as taken, so it stops advising itSource: application/usecases/claim_next.go · domain/task/task.go · adr/0002-pull-based-claimnext-dispatch.md
-
Confirm a scan against a pick
The operator scans an each or a case barcode against a pick task. The scan is checked against the pack view and the picked quantity is counted in eaches.
ActorStation operatorRead modelPack view (GTINs)CommandConfirmPick POST /tasks/{id}/scansScan AggregateTaskSource: application/usecases/pick_scan.go · domain/task/pick.go
-
Form a pick walk
With batching switched on, a station gets one walk of several pick tasks with the same cut-off, up to a maximum and with no hazard clashes. The first task is the one a plain claim would give.
ActorStation operatorRead modelInterleaving hintsCommandFormWork POST /stations/{stationId}/work-batchesBatch AggregateWorkBatch EventWorkBatch Formed EventWorkBatch Formed Source: application/usecases/form_work_batch.go · domain/workbatch/workbatch.go · adr/0063-work-batches-formed-at-assignment-behind-a-mode-gate.md
-
Complete a task
The station that holds the lease completes the task. The completion carries what downstream needs: the work unit, the order reference and, for a relocation, the SKU, bins and quantity.
ActorStation operatorCommandCompleteTask POST /tasks/{id}/completionsAggregateTaskEventTaskCompleted EventTaskCompleted Systemwes-work- planning PolicyMarks the unit of work as doneSysteminventory-storage PolicyBooks the stock move behind a confirmed pick or a relocationSystemlabor-performance PolicyRecords how long the task took and who did itSystemwarehouse-planning PolicyLearns the capacity actually observedSource: application/usecases/complete_task.go · domain/task/task.go · adr/0040-task-completed-carries-order-ref.md
-
Close a pick walk
When the last open task of a walk is completed, the walk completes in the same step, with its member count and walking time.
Event · earlierTaskCompleted PolicyWhenever the last open task of a walk is completed, complete the walkCommandCompleteTask started by the policyAggregateWorkBatch EventWorkBatch Completed EventWorkBatch Completed Source: application/usecases/complete_task.go · domain/workbatch/workbatch.go
-
Record a transfer step
Completing a task that belongs to a stock transfer also reports that transfer's pick, dispatch or arrival.
ActorStation operatorCommandCompleteTask POST /tasks/{id}/completionsAggregateTaskEventTransferPicked EventTransferDispatched EventTransferArrived Systemnetwork-inventory- planning PolicyKeeps the transfer facts to follow each transferSource: application/usecases/complete_task.go · domain/shared/events.go · adr/0036-transfer-task-types-and-facts.md
-
Arrive at the rebin wall
A picked line arrives at its order's consolidation slot. When the last required line is there, one PACK task is created, once.
ActorRebin associateCommandArriveAt POST /rebin/arrivalsRebin AggregateOrderConsolidation Source: application/usecases/arrive_at_rebin.go · domain/consolidation/order_consolidation.go · adr/0016-rebin-and-order-consolidation.md
-
Seal a package
The packer scans the contents and seals the package. An empty carton is never sealed, and items whose hazard classes clash are refused.
ActorPackerRead modelClassification copyCommandSealPackage POST /tasks/{id}/package-sealsAggregatePackageEventPackageSealed analytics stream onlySource: application/usecases/seal_package.go · domain/package/package.go
-
Pass the weigh check
The sealed package is weighed against its expected weight. Within tolerance, a label is applied and the package is manifested for shipping.
ActorSLAM lineCommandRunSlam POST /packages/{id}/slam-runsAggregatePackageEventLabelApplied analytics stream onlyEventPackageManifested EventPackageManifested Systemoutbound-shipping PolicyTakes the manifested package into its own viewSystemorder-management PolicyCloses the promise feedback for the order lineSystemreturns-processing PolicyKeeps a copy of the manifestSource: application/usecases/run_slam.go · domain/package/package.go · adr/0025-cpt-missed-sweep-and-package-manifested.md
-
Fail the weigh check
Outside tolerance, the discrepancy is reported and the package is diverted instead of labelled. Both facts reach exception-management, so someone owns the problem.
ActorSLAM lineCommandRunSlam POST /packages/{id}/slam-runsAggregatePackageEventWeightDiscrepancy Detected EventWeightDiscrepancy Detected EventPackageDiverted EventPackageDiverted Systemexception-management PolicyOpens a case for the packageSource: application/usecases/run_slam.go · domain/package/package.go · adr/0053-promote-package-exception-facts-to-integration-topic.md
-
Free tasks whose lease lapsed
A scheduled job returns claimed tasks whose lease ran out to the pool, so another station can take them. If that was the last open task of a walk, the walk is abandoned.
TimeScheduled sweepPolicyEvery sweep, a claimed task whose lease has lapsed goes back to the poolCommandExpireLeases POST /task-lease-expirationsAggregateTaskEventLeaseExpired analytics stream onlyEventTaskAvailable EventWorkBatch Abandoned EventWorkBatch Abandoned Source: application/usecases/expire_leases.go · domain/task/task.go · adr/0037-sweeps-scheduled-by-cronjob-default-on.md
-
Report missed cut-offs
A scheduled job reports every open task whose cut-off has passed. It changes nothing on the task and reports the same task again on each pass.
TimeScheduled sweepPolicyEvery sweep, any open task past its cut-off is reported as missedCommandSweepCPTMisses POST /cpt-miss-sweepsAggregateTaskEventTaskCPTMissed Systemexception-management PolicyOpens a case, or counts the repeat on the open oneSystemorder-management PolicyRe-promises the orderSource: application/usecases/sweep_cpt_misses.go · adr/0025-cpt-missed-sweep-and-package-manifested.md
-
Count an item picked (never raised)
The model has a fact for each item picked, with an encoder for the analytics stream. No use case raises it: picking is tracked per task, from claim to completion.
Event · earlierItemPicked PolicyWhenever an item is picked, copy it to the analytics stream (nothing raises it yet)Read model · kept up to dateAnalytics streamSource: domain/shared/events.go · adapters/outbound/kafka/analytics_publisher.go · ddd/domain-events.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 station can claim work without being checked in. Check-in is recorded but does not gate a claim.
- Hot spotItemPicked is defined and has an encoder, but no use case raises it. Picking is tracked per task, not per item.
Source: docs/ddd/domain-events.md
- Hot spotThe sort lane is decided for each package, but no conveyor or sorter system exists to act on it.
- Hot spotA missed cut-off is reported again on every sweep, so consumers must count it once.
Source: docs/adr/0025-cpt-missed-sweep-and-package-manifested.md
- Hot spotRebin arrival has no real event source yet, only a manual entry point. The two rebin events never leave the process.
Opportunities
- OpportunityA real sorter system could take the sort lane as its own fact. That integration is not built.
- OpportunityA rebin location model (which bin holds a line) and cartonization are left out of the rebin design.
- OpportunityRecords of sent events are never purged. A retention sweep is named as a follow-up.
This board is a reconstruction from the code and documentation of fulfillment-execution at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.