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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
18
commands
12
policies
20
read models
6
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. 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 catalogue
    Read modelProcess path catalogue
    CommandCreateTaskstarted by the policy
    AggregateTask
    EventTaskCreatedanalytics stream only
    EventTaskAvailable
    Systemtask-interleaving
    PolicyLearns of the open task, so it can advise stations what to work next

    Source: application/usecases/consume_work_released.go · application/usecases/create_task.go · domain/task/task.go

  2. 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 newer
    CommandApplyProductClassifiedstarted by the policy
    Read model · kept up to dateClassification copy

    Source: application/usecases/apply_product_classified.go · adapters/inbound/kafka/product_classified_consumer.go · adr/0039-product-classification-local-copy.md

  3. 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
    EventProductPackLevelDeclared
    PolicyWhenever a pack level is declared or retired, update the pack view
    CommandApplyPackLevelstarted by the policy
    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

  4. 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 operator
    Read modelQueue depth
    Read modelInterleaving hints
    CommandClaimNextPOST /stations/{stationId}/task-claims
    AggregateTask
    EventTaskClaimed
    EventTaskClaimed
    Systemtask-interleaving
    PolicyMarks the task as taken, so it stops advising it

    Source: application/usecases/claim_next.go · domain/task/task.go · adr/0002-pull-based-claimnext-dispatch.md

  5. 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 operator
    Read modelPack view (GTINs)
    CommandConfirmPickScanPOST /tasks/{id}/scans
    AggregateTask

    Source: application/usecases/pick_scan.go · domain/task/pick.go

  6. 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 operator
    Read modelInterleaving hints
    CommandFormWorkBatchPOST /stations/{stationId}/work-batches
    AggregateWorkBatch
    EventWorkBatchFormed
    EventWorkBatchFormed

    Source: application/usecases/form_work_batch.go · domain/workbatch/workbatch.go · adr/0063-work-batches-formed-at-assignment-behind-a-mode-gate.md

  7. 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 operator
    CommandCompleteTaskPOST /tasks/{id}/completions
    AggregateTask
    EventTaskCompleted
    EventTaskCompleted
    Systemwes-work-planning
    PolicyMarks the unit of work as done
    Systeminventory-storage
    PolicyBooks the stock move behind a confirmed pick or a relocation
    Systemlabor-performance
    PolicyRecords how long the task took and who did it
    Systemwarehouse-planning
    PolicyLearns the capacity actually observed

    Source: application/usecases/complete_task.go · domain/task/task.go · adr/0040-task-completed-carries-order-ref.md

  8. 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 walk
    CommandCompleteTaskstarted by the policy
    AggregateWorkBatch
    EventWorkBatchCompleted
    EventWorkBatchCompleted

    Source: application/usecases/complete_task.go · domain/workbatch/workbatch.go

  9. Record a transfer step

    Completing a task that belongs to a stock transfer also reports that transfer's pick, dispatch or arrival.

    ActorStation operator
    CommandCompleteTaskPOST /tasks/{id}/completions
    AggregateTask
    EventTransferPicked
    EventTransferDispatched
    EventTransferArrived
    Systemnetwork-inventory-planning
    PolicyKeeps the transfer facts to follow each transfer

    Source: application/usecases/complete_task.go · domain/shared/events.go · adr/0036-transfer-task-types-and-facts.md

  10. 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 associate
    CommandArriveAtRebinPOST /rebin/arrivals
    AggregateOrderConsolidation

    Source: application/usecases/arrive_at_rebin.go · domain/consolidation/order_consolidation.go · adr/0016-rebin-and-order-consolidation.md

  11. 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.

    ActorPacker
    Read modelClassification copy
    CommandSealPackagePOST /tasks/{id}/package-seals
    AggregatePackage
    EventPackageSealedanalytics stream only

    Source: application/usecases/seal_package.go · domain/package/package.go

  12. 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 line
    CommandRunSlamPOST /packages/{id}/slam-runs
    AggregatePackage
    EventLabelAppliedanalytics stream only
    EventPackageManifested
    EventPackageManifested
    Systemoutbound-shipping
    PolicyTakes the manifested package into its own view
    Systemorder-management
    PolicyCloses the promise feedback for the order line
    Systemreturns-processing
    PolicyKeeps a copy of the manifest

    Source: application/usecases/run_slam.go · domain/package/package.go · adr/0025-cpt-missed-sweep-and-package-manifested.md

  13. 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 line
    CommandRunSlamPOST /packages/{id}/slam-runs
    AggregatePackage
    EventWeightDiscrepancyDetected
    EventWeightDiscrepancyDetected
    EventPackageDiverted
    EventPackageDiverted
    Systemexception-management
    PolicyOpens a case for the package

    Source: application/usecases/run_slam.go · domain/package/package.go · adr/0053-promote-package-exception-facts-to-integration-topic.md

  14. 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 sweep
    PolicyEvery sweep, a claimed task whose lease has lapsed goes back to the pool
    CommandExpireLeasesPOST /task-lease-expirations
    AggregateTask
    EventLeaseExpiredanalytics stream only
    EventTaskAvailable
    EventWorkBatchAbandoned
    EventWorkBatchAbandoned

    Source: application/usecases/expire_leases.go · domain/task/task.go · adr/0037-sweeps-scheduled-by-cronjob-default-on.md

  15. 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 sweep
    PolicyEvery sweep, any open task past its cut-off is reported as missed
    CommandSweepCPTMissesPOST /cpt-miss-sweeps
    AggregateTask
    EventTaskCPTMissed
    Systemexception-management
    PolicyOpens a case, or counts the repeat on the open one
    Systemorder-management
    PolicyRe-promises the order

    Source: application/usecases/sweep_cpt_misses.go · adr/0025-cpt-missed-sweep-and-package-manifested.md

  16. 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 stream

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

Opportunities

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.