Skip to main content

Context Map

This page follows the ddd-crew Context Mapping notation and shows this bounded context's slice of the fleet map. It is part of the DDD artifact pack.

Process Path Management is always upstream. It is the Open Host Service / Published Language source for the warehouse.process-path-management.events topic and has zero outbound dependency on any other bounded context: it consumes no other context's topic and makes no synchronous REST or MCP call to any sibling. This is enforced in code by internal/architecture/fitness_test.go's TestNoSiblingContextOutboundCalls, which fails the build if internal/adapters/outbound/** ever imports net/http. Cross-context facts it needs (capability names, site ids, facility-layout location roles, product attributes) are carried as local, declarative values, never looked up live. The product attributes in a path's eligibility are free strings such as hazmat or fragile; the SKU handling classification behind them is owned by product-master. This service neither consumes warehouse.product-master.events nor validates against that vocabulary (internal/domain/shared/eligibility.go).

Map​

Source: internal/adapters/outbound/kafka/publisher.go, internal/adapters/kafka/cloudevents/types.go, internal/adapters/inbound/mcp/tools.go, cmd/pathmgmt-reports/main.go, internal/architecture/fitness_test.go, plus the sibling adapter files listed in the table below (read from each sibling's origin/develop). Omits: the shared Kafka broker, Kong/Nginx edges, and siblings with no relationship to this context (inventory-storage, product-master, labor-performance, warehouse-planning, network-inventory-planning).

Legend: solid edge = live; dashed edge = wired but unused; crossed edge = deliberately absent. U to D = Upstream to Downstream. Patterns: OHS = Open Host Service, PL = Published Language, CF = Conformist.

Relationships​

#Upstream → DownstreamPatternTechnologyStatusEvidence
1process-path-management → fulfillment-executionOHS + PL → CFKafka warehouse.process-path-management.events, types com.warehouse.wes.process-path-management.processpath.ProcessPathCreated / ...ProcessPathUpdated / ...ProcessPathDeactivatedLivefulfillment-execution internal/adapters/outbound/kafkacatalog/consumer.go
2process-path-management → wes-work-planningOHS + PL → CFSame topic, same three processpath.* typesLivewes-work-planning internal/adapters/outbound/kafkacatalog/consumer.go
3process-path-management → workforce-managementOHS + PL → CFSame topic, same three processpath.* typesLiveworkforce-management internal/adapters/outbound/kafkacatalog/consumer.go
4process-path-management → order-managementOHS + PL → CFSame topic: three processpath.* types (decoding cycle_time_p95, eligibility) plus com.warehouse.wes.process-path-management.cptschedule.CPTScheduleChangedLiveorder-management internal/adapters/outbound/kafkacatalog/consumer.go and internal/adapters/outbound/kafkacptschedule/consumer.go
5process-path-management → network-fulfillmentOHS + PL → CFSame topic: three processpath.* types (decoding cycle_time_p95) plus cptschedule.CPTScheduleChangedLivenetwork-fulfillment internal/adapters/outbound/processpathcache/consumer.go, started from cmd/netfulfil/main.go
6process-path-management → dock-schedulingOHS + PL → CFSame topic: only com.warehouse.wes.process-path-management.cptschedule.CPTScheduleChangedLivedock-scheduling internal/adapters/inbound/kafka/cutoff_consumer.go
7process-path-management → outbound-shippingOHS + PL → CFSame topic: only cptschedule.CPTScheduleChangedLiveoutbound-shipping internal/adapters/inbound/kafka/cpt_layout_consumers.go and internal/application/usecases/apply_cpt_schedule.go
8process-path-management → warehouse-ops-agentOHS (MCP) → CustomerMCP Streamable HTTP, tools get_process_path, list_process_pathsWired but unusedwarehouse-ops-agent internal/adapters/outbound/mcpclient/process_path_management.go; cmd/agent/main.go assigns it to _ ("kept wired for a future use case")
9process-path-management → warehouse-consoleOHS (REST) → Customerweb/ remote process_path_mfe calling POST/PUT/DELETE /process-paths* through Kong /api/process-path-managementLivethis repo's web/src/api.ts; warehouse-console src/App.tsx (process_path_mfe/App)
10process-path-management (pathmgmt-reports) → warehouse-consoleOHS (REST) → CustomerGET /reports/catalogue-growth, GET /reports/catalogue-growth/freshnessLivewarehouse-console src/features/context-reports/processPathManagement.config.tsx
11facility-layout ↔ process-path-managementSeparate Waysnone — DestinationLocationRole (Drop/WorkCenter/Shipping) and SiteId are local copies of facility-layout vocabulary, kept in sync by conventionDeliberately absentinternal/domain/shared/shared.go
12any sibling → process-path-management (inbound Kafka)—none — the only consumer in this repo reads its own analytics topicDeliberately absentinternal/adapters/inbound/kafka/analytics_consumer.go
13process-path-management → any sibling (REST/MCP client)—none — bannedDeliberately absentTestNoSiblingContextOutboundCalls in internal/architecture/fitness_test.go

The get_cpt_schedule and get_catalogue_growth_report MCP tools have no known sibling caller today.

What the consumers read​

  • fulfillment-execution, wes-work-planning and workforce-management replay the topic into a local catalogue cache. Each decodes destination_location_role (ADR 0009) into that cache; none of them consumes CPTScheduleChanged. The cutover from the static YAML file was executed on 2026-09-06 (ADR 0002).
  • order-management runs two consumers, one for the path catalogue (cycle_time_p95, eligibility) and one for CPTScheduleChanged — the fulfillment capability contract of ADR 0010, from which it derives its promise.
  • network-fulfillment keeps one combined read model of path cycle_time_p95 and site CPT schedules (processpathcache), with a per-process-unique consumer group replaying from the earliest offset.
  • dock-scheduling and outbound-shipping consume only CPTScheduleChanged and ignore every other type on the topic (cutoff_consumer.go: "the one process-path-management type the consumer acts on"; cpt_layout_consumers.go: "the only process-path-management type this service acts on"). Each treats the event as the whole schedule of the site and replaces its copy (apply_cpt_schedule.go: "replace the site's whole schedule copy (last writer wins per site)").

Evidence was read with git grep against each sibling's locally fetched origin/develop; re-check before relying on a sibling detail.

Own analytics topic (not a sibling integration)​

Every domain event a use case raises is also published onto warehouse.process-path-management.analytics (ADR 0007) in the same outbox transaction. The start-up catalogue republish (ADR 0038) is the exception: it goes to the integration topic only. The only consumer is this service's own pathmgmt-projector (consumer group process-path-management-analytics), which projects the "Process Path Catalogue Growth & Change" report served by pathmgmt-reports. It projects the three ProcessPath* types and skips CPTScheduleChanged; a message that is not a valid CloudEvent is dead-lettered to warehouse.process-path-management.analytics.dlq (ADR 0012).

Every message on both topics is a CloudEvents 1.0 event in structured content mode, Kafka header content-type: application/cloudevents+json; charset=UTF-8 (ADR 0016):

{
"specversion": "1.0",
"id": "4f1c2a7e-9d31-4a6b-8f0e-6b2c1d5e7a90",
"source": "/warehouse/process-path-management",
"type": "com.warehouse.wes.process-path-management.processpath.ProcessPathCreated",
"subject": "PICK",
"time": "2026-09-06T00:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:process-path-management:events:ProcessPathCreated:v1",
"data": {
"path_id": "PICK",
"match_prefix": "pick",
"direct": true,
"required_capabilities": ["pick"],
"cycle_time_p95": "2h0m0s",
"eligibility": {}
}
}

Exact type strings consumers dispatch on (cross-service contract):

typeconsumers
com.warehouse.wes.process-path-management.processpath.ProcessPathCreatedfulfillment-execution, wes-work-planning, workforce-management, order-management, network-fulfillment
com.warehouse.wes.process-path-management.processpath.ProcessPathUpdatedsame five
com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivatedsame five
com.warehouse.wes.process-path-management.cptschedule.CPTScheduleChangedorder-management, network-fulfillment, dock-scheduling, outbound-shipping
com.warehouse.wes.process-path-management.processflow.ProcessFlowDefined, ...ProcessFlowRevised, ...ProcessFlowRetiredwarehouse-planning (the consumer named in ADR 0042; its side is owned by that repo)

The analytics occurrence carries the same type/id/subject/time/data with dataschema urn:warehouse:process-path-management:analytics:<EventName>:v1. Per-event payloads: Domain Events; full schema: apis/asyncapi.yaml.

Why this is Kafka-event-driven, not synchronous HTTP read-through​

Every other cross-context integration in this fleet that resembles "context A needs a fact that context B owns" is Kafka-driven, never a synchronous hot-path call. A synchronous read-through here (each consumer calling this service's REST API on every dispatch decision) would put this Generic-subdomain service's availability on the hot path of the consuming contexts' most latency-sensitive operations. See ADR 0001 for the full reasoning.

Why this is a separate bounded context, not a package inside an existing one​

No single existing context should own the process-path catalogue: it is needed identically by several services, and none of them is a more natural owner than the others. This is the same "extract generic logic instead of duplicating it" argument facility-layout was built on — see ADR 0001, including the retired static-YAML predecessor this service replaces.