Skip to main content

Ubiquitous Language

The definitions below are pulled directly from internal/domain/processpath/process_path.go, internal/domain/cptschedule/cpt_schedule.go, internal/domain/processflow/process_flow.go, internal/domain/cptschedule/events.go, internal/domain/shared/shared.go, internal/domain/shared/eligibility.go and internal/domain/shared/events.go — not reinvented for this page. Part of the DDD artifact pack.

Glossary → code​

TermCode identifierKindWire name (REST / Kafka)Note
Process Pathprocesspath.ProcessPathAggregate rootprocessPathResponse DTO / ProcessPathData
Path Idshared.PathIdIdentity (string type)pathId / path_idSame identity as fulfillment-execution task.Type, wes-work-planning WorkPool.PathId, workforce-management PathPlan.PathId.
Match PrefixProcessPath.matchPrefix (MatchPrefix())AttributematchPrefix / match_prefix
DirectProcessPath.direct (Direct())Attributedirect / directOmitted from the Kafka payload when false (omitempty).
Capabilityshared.CapabilityValue (string type)requiredCapabilities[] / required_capabilities[]The domain term is required capabilities; the type is the single Capability.
Destination Location Roleshared.DestinationLocationRoleValue (closed string enum)destinationLocationRole / destination_location_roleConstants DestinationLocationRoleUnset, ...Drop, ...WorkCenter, ...Shipping.
Cycle Time p95ProcessPath.cycleTimeP95 (time.Duration)AttributecycleTimeP95 / cycle_time_p95Go duration string on both wires (2h0m0s).
Eligibilityshared.EligibilityValue objecteligibility / eligibilityFields maxUnitsPerLine, requiredProductAttributes, excludedProductAttributes, nonSortable.
Statusprocesspath.StatusEnumerationstatusStatusActive = "ACTIVE", StatusDeactivated = "DEACTIVATED". Not carried on Kafka — the event type conveys it.
Define / Revise / Deactivateprocesspath.Define, (*ProcessPath).Revise, (*ProcessPath).DeactivateFactory / commandsPOST, PUT, DELETE /process-paths…Use cases usecases.DefinePath, RevisePath, DeactivatePath.
CPT Schedulecptschedule.CPTScheduleAggregate rootcptScheduleResponse DTO / CPTScheduleDataOne per site.
Site Idshared.SiteIdIdentity (string type)siteId / site_idfacility-layout vocabulary, never validated against it.
Cutoffcptschedule.CutoffEntity (local identity cptId)cutoffs[]Built by cptschedule.NewCutoff.
CPT IdCutoff.cptIdLocal identitycptId / cpt_idUnique within a schedule.
Local TimeCutoff.localTimeAttributelocalTime / local_timeStrict HH:MM 24-hour.
Day of Weekcptschedule.WeekdayEnumerationdaysOfWeek[] / days_of_week[]Mon..Sun.
Ship MethodCutoff.shipMethodAttributeshipMethod / ship_methodFree-form label.
Eligible Path IdsCutoff.eligiblePathIdsReference by ideligiblePathIds / eligible_path_idsMust name Active paths (use-case check).
Cutoff Snapshotcptschedule.CutoffSnapshotEvent payload partCutoffDataCode-only name; the domain says "cutoff".
Process Path Created / Updated / Deactivatedshared.ProcessPathCreated, shared.ProcessPathUpdated, shared.ProcessPathDeactivatedDomain eventscom.warehouse.wes.process-path-management.processpath.<Name>
CPT Schedule Changedcptschedule.CPTScheduleChangedDomain eventcom.warehouse.wes.process-path-management.cptschedule.CPTScheduleChangedFull snapshot, raised on define AND revise.
Process Flowprocessflow.ProcessFlowAggregate rootprocessFlowDTO (MCP) / ProcessFlowDataThe ordered stages a workload passes through; identity processflow.FlowId (flowId / flow_id); status ACTIVE/RETIRED; version is published (ADR 0042). A ProcessPath is one stage of work, a flow says which stage follows which.
Stageprocessflow.StageValue objectstages[] (pathId, processType / path_id, process_type)Built by processflow.NewStage; a path appears at most once per flow.
Process Typeprocessflow.ProcessTypeEnumerationprocessType / process_typePICK, REBIN, PACK, SLAM, DISPATCH, ARRIVAL, RELOCATE, REPLENISH.
Define / Revise / Retire (flow)processflow.Define, (*ProcessFlow).Revise, (*ProcessFlow).RetireFactory / commandsPUT /process-flows/{flowId} (define and revise), DELETE /process-flows/{flowId} (retire)Use cases usecases.DefineProcessFlow (define AND revise), RetireProcessFlow.
Process Flow Defined / Revised / Retiredprocessflow.ProcessFlowDefined, processflow.ProcessFlowRevised, processflow.ProcessFlowRetiredDomain eventscom.warehouse.wes.process-path-management.processflow.<Name>Full state with version; ProcessFlowRevised is also the start-up republish.
Catalogue Growth reportreport.CatalogueReport, report.RowRead modelGET /reports/catalogue-growthAnalytics side, not part of the OLTP model.

Terms whose code name differs: "required capabilities" → shared.Capability slice; "deactivate" is a soft delete exposed as HTTP DELETE; "cutoff" in events is CutoffSnapshot / CutoffData; "revise a CPT schedule" has no separate use case — DefineCPTSchedule both defines and revises.

ProcessPath​

ProcessPath implements the operator-configurable definition of one process path (its canonical identity, the path_id-family match rule downstream consumers use, and the capabilities a station/associate must hold to work it).

The aggregate root. Identity (PathId) is immutable once constructed; MatchPrefix, RequiredCapabilities, CycleTimeP95 and Eligibility may be revised while Active via Revise; Direct and DestinationLocationRole are immutable (they describe structural facts about the path's routing shape, not operational parameters operators tune).

This aggregate replaces what was, before this service existed, a static YAML file (warehouse-infra/config/process-paths/sortable-fc.yaml) loaded once at boot by three other services.

PathId​

PathId is the canonical identity of a process path (e.g. "PICK", "PACK", "REBIN", "SLAM"). It is the SAME identity fulfillment-execution's task.Type, wes-work-planning's WorkPool.PathId, and workforce-management's PathPlan.PathId all reference — this service is the one place that identity is DEFINED, not just consumed.

Kept as a plain string type (not an enum) because the valid set is operator-configurable, not compiled in. The families an environment must define are declared in catalogue/paths.json and applied through the API (see Process-path catalogue).

RELOCATE is the path that carries slot-plan moves (a SKU moved between bins, planned by wes-work-planning from an approved slotting plan) as floor work. Capability relocate; its intake is SLOT_RELOCATION only, so the path is never chosen for order fulfilment (ADR 0033, ADR 0034).

DISPATCH is the path that carries the dispatch leg of an inter-warehouse stock transfer. Capability dispatch; its intake is STOCK_TRANSFER only. The path id is the fulfillment-execution task type, so it is DISPATCH, not TRANSFER_DISPATCH (ADR 0035).

REPLENISH is the path that carries pick-face top-ups (a replenishment planned by wes-work-planning from a pick-face-replenishment request). Capability replenish; its intake is REPLENISHMENT only, the one demand source that may route work onto it (ADR 0036).

Capability​

Capability is a named qualification a station/associate must hold to work a process path (e.g. "pick", "pack", "hazmat") — the exact same vocabulary workforce-management's Certification and fulfillment-execution's Station.Capability already use.

This service does not invent a new capability vocabulary; it is the authoritative SOURCE for which capabilities a given path requires.

Intake and DemandSource​

Intake is the set of demand sources allowed to route work onto a path (ADR 0034). A DemandSource is one of CUSTOMER_ORDER (order-management order lines), STOCK_TRANSFER (network-inventory-planning transfer legs, via WES), SLOT_RELOCATION (approved slot-plan moves, via WES), REPLENISHMENT (pick-face top-ups, via WES; ADR 0036) or INVENTORY_CONTROL (amnesty, damage, problem solve).

A set: distinct values, canonical order, unknown or repeated values rejected (shared.ErrInvalidIntake). The empty set is valid and means the path is reached only by an explicit path id from an upstream stage (PACK, REBIN, SLAM). Routing policy, not identity: revisable while Active. Not to be confused with eligibility, which says what a unit of work must look like to be routed to the path, not who may route it there.

MatchPrefix​

The lower-case prefix downstream consumers match a caller-supplied id against: id == matchPrefix OR id starts with matchPrefix + "-" — never a bare substring match without the separator (a hypothetical "picking-station" must not match "pick"). Validated lower-case at construction time (ErrMatchPrefixNotLowercase) — not lower-cased for the caller — so persisted data is exactly what was validated.

Direct​

A structural fact about the path's routing shape (reserved for a future multi-hop topology, not a day-to-day operational parameter). Immutable once set at Define time — never revisable via Revise.

DestinationLocationRole​

An optional declaration of which facility-layout LocationRole a completed task on this path is destined for: Drop, WorkCenter or Shipping, or unset (the zero value). Declarative routing intent only — this service never calls facility-layout to validate it; the closed value set is kept in sync by convention (shared.ErrInvalidDestinationLocationRole for an unknown value). Immutable once set at Define time. See ADR 0009.

CycleTimeP95​

The operator-declared p95 end-to-end cycle time from release into the path to manifest (ADR 0010) — a declared standard, not a measured value.

Required and strictly positive (ErrInvalidCycleTime otherwise), revisable while Active. See ADR 0010.

Eligibility​

A value object declaring the rules a unit of work must satisfy to be routed to a path: maxUnitsPerLine (unset means unbounded; 1 declares a singles path), requiredProductAttributes, excludedProductAttributes, and nonSortable. Every field is optional and the zero value is fully permissive. Compared with Eligibility.Equal for no-op detection.

CPTSchedule, Cutoff, SiteId​

A site-scoped, recurring Critical Pull Time (CPT) schedule. A CPT is a property of a departure, not of a path — several paths feed the same truck, and a slow path simply cannot make the later ones — so the schedule is modelled once per site rather than duplicated on every path.

The second aggregate root, identified by SiteId. It holds an IANA timezone and one or more Cutoffs, each with a cptId (unique within the schedule), a localTime (HH:MM), daysOfWeek (Mon..Sun), a shipMethod, and the eligiblePathIds that can make it. Revised wholesale, never partially.

ProcessFlow, Stage, ProcessType​

The ordered sequence of process-path stages a workload passes through. A ProcessPath names one stage of work (PICK, PACK, REBIN, SLAM); which stage feeds which is the flow's job, not the path's. (ADR 0042)

The third aggregate root, identified by FlowId. It holds a name, one or more ordered Stages (each a pathId naming an Active path and a processType from the closed set PICK, REBIN, PACK, SLAM, DISPATCH, ARRIVAL, RELOCATE, REPLENISH), a status (ACTIVE/RETIRED) and a version that starts at 1 and grows by one per accepted change. A path appears at most once per flow. Revised wholesale, retired rather than deleted; a retired flow cannot be revised.

Status (Active / Deactivated)​

Status is the activation lifecycle of a ProcessPath. There is no "draft" state — a path is live the instant it is defined.

Two values: ACTIVE and DEACTIVATED. Deactivation is a one-way, idempotent transition — see the Aggregate Design Canvas for the full lifecycle.