Fulfillment Execution
Fulfillment Execution turns released work into completed physical
operations: the task lifecycle for Pick, Pack, Rebin, SLAM and slot-plan
Relocate. It sits
in the WES tier, downstream of wes-work-planning (which decides how much
work should be released and when) and answers a narrower, harder question —
how does a released unit of work safely get from the pool into a completed
state, without ever being lost?
The defining design rule is pull, not push: a station claims the next
task (claimNext(stationId, capabilities)); the system selects work, not
workers. There is deliberately no assign(task, station) operation. A claim
is a time-boxed lease — if it is not renewed or completed before expiry,
the task returns to the pool rather than vanishing. This context has the
longest ADR trail in the fleet: forty-eight decisions (0001 to 0048) on
develop, including the pull-dispatch rule itself, the lease mechanism,
per-package DOT hazard segregation, a structural (unimplemented)
anti-corruption seam reserved for the WCS/equipment tier this platform
deliberately does not build, a CPT-missed sweep, PackageManifested, and an
on-time-to-CPT KPI that feed order-management's promise loop, and — most
recently — the RELOCATE task that executes approved slot-plan moves
(ADR 0047) and the REPLENISH task that executes pick-face top-ups
(ADR 0050).
Besides orders, this context also runs slot-plan moves: work that
wes-work-planning releases on the RELOCATE path becomes a RELOCATE task
carrying one move (SKU, source and destination bin). The operator carries the
stock, counts it and scans the bins, and the completion's TaskCompleted
carries what moved for inventory-storage to record on the ledger.
Work released on the REPLENISH path is the same shape for pick-face top-ups: a
REPLENISH task carries the planned move (request id, SKU, reserve and pick-face
bins, quantity, NORMAL or URGENT), the operator confirms the quantity, and the
completion's TaskCompleted adds the request id as request_ref. The release is
produced by wes-work-planning (its ADR 0042), whose replenishment consumer runs
with REPLENISHMENT_MODE=kafka in warehouse-infra develop.
Case-aware picking (ADR 0054):
POST /tasks/{id}/scans (confirmPickScan) confirms each scanned each or case
GTIN against a PICK task, resolved against the local copy of product-master's
pack levels, and counts the eaches confirmed so far. When an each pick finds only
a sealed case at its source, a BREAK_CASE task is created;
POST /tasks/{id}/case-breaks (completeCaseBreak) asks inventory-storage to
break the container (POST /containers/{lpn}/case-breaks, with an Idempotency-Key
stable per task) and only then completes the task. If inventory-storage cannot
be reached the task stays claimed (503).
This context's pages
- Business Context: why
pull-based
claimNextdispatch beats push assignment, and the task lifecycle in business language. - Ubiquitous Language:
Task,
claimNext, Lease, Station, Fragile, Gift wrap and the rest of this context's exact vocabulary. - Core Domain Chart (ddd-crew core-domain-charts): why this context is Core.
- Bounded Context Canvas (ddd-crew bounded-context-canvas): purpose, strategic classification, roles, inbound and outbound communication, business decisions and open questions.
- Context Map (ddd-crew context-mapping): every upstream and downstream relationship with its pattern, technology and status.
- Aggregate Design Canvas
(ddd-crew aggregate-design-canvas):
the
Taskaggregate, with its state transitions, invariants, corrective policies, commands and events. - Domain Events: the
thirteen past-tense domain events. Three of them (
TaskCompleted,TaskCPTMissedandPackageManifested) form the integration contract onwarehouse.fulfillment.events, ten go to the analytics topic, and two Rebin events never leave the process. - Domain Message Flow (ddd-crew domain-message-flow-modelling): key scenarios as commands, events and queries.
- EventStorming (ddd-crew eventstorming-glossary-cheat-sheet): process-level boards.
- Class Diagram: the domain model as it exists in the code.
- Entity Relationship: the persisted tables.
- Sequence Diagrams: the main runtime interactions.
- Async API: the Kafka
integration in narrative form, including the shared fan-out topic that
four downstream consumers (
wes-work-planning,labor-performance,order-managementandinventory-storage) read.
Every page above except the Business Context and the Async API narrative
is synced from the fulfillment-execution repository.
Elsewhere
- Repository: github.com/IQVO/fulfillment-execution,
with its full ADR trail under
docs/docs/adr/. - ADR index: links to this context's own decision records.
- REST API Reference
and AsyncAPI Reference,
generated from the real
apis/openapi.yamlandapis/asyncapi.yaml.