Domain message flow
This page is a copy of docs/docs/ddd/domain-message-flow.md on develop, derived from that repository's code. Edit it there, then re-sync.
The key business scenarios as numbered command, event and query flows, following ddd-crew
Domain Message Flow Modelling. Edges that exist on develop
are solid arrows; a dashed arrow marks a step whose producer or consumer is not built. Built does not mean deployed:
warehouse-infra runs the API and its consumers but not this service's MCP server, analytics pair or web remote.
1. Keep the local copies current
Source: internal/adapters/inbound/kafka/{layout,slotting,inventory}_consumer.go,
internal/application/usecases/{apply_layout,apply_forward_assignments,apply_bin_level}.go.
2. Declare a policy and sweep a site
Source: internal/application/usecases/{declare_policy,list_pick_faces,evaluate_site}.go,
internal/adapters/outbound/events/sink.go.
3. Execute and close a request
Source: ADR 0001 context map, internal/application/usecases/apply_relocation.go; wes-work-planning ADR 0042 and
internal/adapters/inbound/kafka/replenishment_consumer.go; process-path-management ADR 0036 and catalogue/paths.json;
fulfillment-execution ADR 0050 and apis/asyncapi.yaml (TaskAvailable, TaskCompleted.request_ref);
inventory-storage ADR 0040 and 0041 and apis/asyncapi.yaml, all on origin/develop. Every step exists on develop, but
the flow's infra switches are set (warehouse-infra registers this service and sets REPLENISHMENT_MODE=kafka on
wes-work-planning; cluster state was not checked), and until the REPLENISH path is seeded in a cluster wes-work-planning
dead-letters the requests.
4. A new slot plan changes the forward map
Source: internal/application/usecases/apply_forward_assignments.go.
5. Cancel and remove
Source: internal/application/usecases/{cancel_request,remove_policy}.go.