Bounded Context Canvas
Built on develop (merged 2026-11-08) in IQVO/dock-scheduling, released at v0.1.3 (first release v0.1.0 on 2026-11-09; applied to the k3s cluster on 2026-11-10 at v0.1.2 in a reduced footprint, and the image pinned to the v0.1.3 commit a1a029c in warehouse-infra since 2026-11-16, checked 2026-12-02): dock-scheduling runs its API only (it relays inline); yard-management runs its API and relay. The MCP server (18 tools on develop 096db0a, 14 in v0.1.3) is registered in warehouse-infra but switched off until the cluster has room; the A2A agent (two skills) is built on develop (2026-12-02), not released and not deployed (the chart carries it off by default and warehouse-infra has no a2a block); the analytics projectors, report services and sweeps are registered but switched off, so the KPI reports of yard-management ADR 0011 are released, not yet served. The page still derives from yard/model/model.yaml; where the as-built service differs, the model and this page say so (see the as-built notes).
Following the ddd-crew Bounded Context Canvas v5.
Every message row comes from contexts[dock-scheduling] → inbound, rest,
publishes, consumes and sync_calls (empty).
Canvas at a glance
Two pictures of the sections below: first the collaborators that command,
query or feed this context (with its purpose, roles and the decisions it
enforces), then the collaborators it notifies. Arrows follow the message
type: solid blue commands (cmd), dotted green queries (qry),
thick orange events (evt). Box shapes mark the collaborator kind:
rounded = people or any client; blue = sibling bounded context; grey = this
context's own scheduler; dashed = published with no named consumer
(analytics only). Channel names are abbreviated; the tables carry the exact
route, topic and CloudEvents type.
Inbound
Outbound
Derived from: model.yaml → contexts[dock-scheduling].inbound,
.rest, .publishes, .consumes, .business_decisions, .roles.
Omitted: assumptions, metrics, open questions and the glossary (sections
below); the relationship pattern per message (see the tables); full
CloudEvents types and routes (see the tables). There are no outbound
commands or queries: sync_calls is empty, so this context calls no other
context synchronously.
Name
Dock Scheduling (dock-scheduling, code DS, CloudEvents subdomain
wms).
Purpose
Own the door calendar of every site: every booked time window on every dock
door, inbound and outbound, from booking through arrival to door release, the
no-double-booking rule, door opening hours and closures, ETA-driven risk and
no-shows. It owns the future of a door; yard-management owns the
present of the yard. Each keeps an event-fed local copy of what it needs
from the other, and neither records the other's facts.
Strategic Classification
| Axis | Verdict |
|---|---|
| Domain | Supporting (see Core Domain Chart). |
| Business Model | Cost reducer (carrier wait, detention, idle dock labour) and revenue protector (on-time inbound). |
| Evolution | Product. |
Domain Roles
| Role | Evidence in the model |
|---|---|
| Specification (door calendar) | DockCalendar holds operating hours, closures and settings; every booking is checked against it; GetDockCalendar and GetDoorAvailability publish it. |
| Gateway for carriers (Open Host Service) | The carrier scheduler books, reschedules, cancels and reports ETAs over REST (relationship: OHS); any context queries over REST (OHS); agent clients reach the same reads and the booking writes over MCP and the A2A skill (built, switched off). |
| Analysis (adherence) | Read model AdherenceReport: on-time, early, late and no-show share per site and carrier, built from the analytics topic; route GET /reports/schedule-adherence. |
Inbound Communication
The Kafka types are read from each producer's AsyncAPI and the service dispatches on the
full type string (process-path-management is in the wes tier:
com.warehouse.wes.process-path-management.cptschedule.CPTScheduleChanged).
| Collaborator | Message | Type | Channel | Relationship |
|---|---|---|---|---|
| Carrier scheduler (carrier portal) | BookAppointment | Command | REST POST /appointments | OHS |
| Carrier scheduler (carrier portal) | RescheduleAppointment | Command | REST POST /appointments/{appointmentId}/reschedules | OHS |
| Carrier scheduler (carrier portal) | CancelAppointment | Command | REST POST /appointments/{appointmentId}/cancellations | OHS |
| Carrier scheduler (carrier portal) | ReportEta | Command | REST POST /appointments/{appointmentId}/eta-reports | OHS |
| Dock planner | RescheduleAppointment | Command | REST POST /appointments/{appointmentId}/reschedules | UI |
| Dock planner | CancelAppointment | Command | REST POST /appointments/{appointmentId}/cancellations | UI |
| Dock planner | DeclareOperatingHours | Command | REST PUT /sites/{siteId}/dock-calendar/operating-hours | UI |
| Dock planner | DeclareCalendarSettings | Command | REST PUT /sites/{siteId}/dock-calendar/settings | UI |
| Dock planner | ScheduleDoorClosure | Command | REST POST /sites/{siteId}/dock-calendar/closures | UI |
| Dock planner | LiftDoorClosure | Command | REST POST /sites/{siteId}/dock-calendar/closures/{closureId}/lifts | UI |
| Any context | ListAppointments | Query | REST GET /appointments | OHS |
| Any context | GetAppointment | Query | REST GET /appointments/{appointmentId} | OHS |
| Any context | GetDoorAvailability | Query | REST GET /doors/{doorCode}/availability | OHS |
| Any context | GetDockCalendar | Query | REST GET /sites/{siteId}/dock-calendar | OHS |
| Scheduler (cron) | MarkNoShow | Command | REST POST /no-show-sweeps | UI |
warehouse-ops-agent, AI clients | ListAppointments, GetAppointment, GetDoorAvailability, GetDockCalendar, ListAtRisk, GetDockBriefing, ListCarriers, GetCarrier (L1 tools; the ops agent wires seven of the eight) | Query | MCP /api/mcp/dock-scheduling (Agent Router, rewritten to /mcp) | OHS |
| AI clients | propose_reschedule_plan, propose_late_arrival_actions (L2 tools: a stored proposal, no change) | Query | MCP /api/mcp/dock-scheduling | OHS |
| AI clients | BookAppointment, RescheduleAppointment, CancelAppointment, ReportEta, ApplyReschedulePlan, RegisterCarrier, SuspendCarrier, ReinstateCarrier (L3 tools, each with idempotencyKey and initiated_by) | Command | MCP /api/mcp/dock-scheduling | OHS |
Delegating agent (warehouse-ops-agent with DOCK_SCHEDULING_A2A_URL set, or any agent client) | appointment_options (L1 skill) | Query | A2A /api/a2a/dock-scheduling (Agent Router, rewritten to /) | OHS |
| Delegating agent | book_or_reschedule_appointment (L3 skill: BookAppointment or RescheduleAppointment) | Command | A2A /api/a2a/dock-scheduling | OHS |
yard-management | VisitCheckedIn | Event | Kafka warehouse.yard-management.events, com.warehouse.wms.yard-management.yardvisit.VisitCheckedIn | Customer/Supplier |
yard-management | VisitRejected | Event | Kafka warehouse.yard-management.events, com.warehouse.wms.yard-management.yardvisit.VisitRejected | Customer/Supplier |
yard-management | TrailerDocked | Event | Kafka warehouse.yard-management.events, com.warehouse.wms.yard-management.trailer.TrailerDocked | Customer/Supplier |
yard-management | TrailerUndocked | Event | Kafka warehouse.yard-management.events, com.warehouse.wms.yard-management.trailer.TrailerUndocked | Customer/Supplier |
facility-layout | LocationSlotRegistered | Event | Kafka warehouse.facility.events | Conformist |
facility-layout | LocationSlotDecommissioned | Event | Kafka warehouse.facility.events | Conformist |
facility-layout | ZoneRegistered | Event | Kafka warehouse.facility.events | Conformist |
inbound-receiving | ASNRegistered | Event | Kafka warehouse.inbound-receiving.events | Conformist |
inbound-receiving | ASNCancelled | Event | Kafka warehouse.inbound-receiving.events | Conformist |
process-path-management | CPTScheduleChanged | Event | Kafka warehouse.process-path-management.events | Conformist |
Reports: GET /reports/schedule-adherence and GET /reports/freshness are served by
the separate reports binary from apis/openapi-reports.yaml (read-only, on the analytics
database) and have an inbound row of their own (dock planner, query).
The MCP and A2A rows are as built on develop 096db0a (read 2026-12-02; service ADRs
0007, 0012, 0015 and 0016), not rows of the model: the 18 MCP tools (8 L1, 2 L2, 8 L3)
and the two A2A skills call the same use cases as their REST twins, listed on
Use Cases.
Both surfaces are built on develop and switched off: mcp.enabled: false in
warehouse-infra, no a2a block there, and v0.1.3 ships the MCP server with 14 tools
and no A2A agent (see Status).
Outbound Communication
Topics are warehouse.dock-scheduling.events for integration events (each also goes, as a
twin, to the analytics topic) and warehouse.dock-scheduling.analytics for the events the
model marks analytics only. The relationship column is the model's for yard-management
and this pack's reading for the others.
| Collaborator | Message | Type | Channel | Relationship |
|---|---|---|---|---|
yard-management, warehouse-planning, inbound-receiving, outbound-shipping | DockAppointmentBooked | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked | yard-management: Customer/Supplier; the others: OHS + PL (reading) |
yard-management, warehouse-planning, inbound-receiving | DockAppointmentRescheduled | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled | same |
yard-management, warehouse-planning, inbound-receiving | DockAppointmentCancelled | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled | same |
yard-management, warehouse-planning, exception-management | DockAppointmentNoShow | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow | same |
inbound-receiving | DockAppointmentDoorReassigned | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentDoorReassigned | OHS + PL (reading); integration since 2026-11-09 (service ADR 0010) |
yard-management | DoorClosureScheduled | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockcalendar.DoorClosureScheduled | Customer/Supplier |
yard-management | DoorClosureLifted | Event | Kafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockcalendar.DoorClosureLifted | Customer/Supplier |
| analytics only | DockAppointmentCheckedIn | Event | Kafka warehouse.dock-scheduling.analytics, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCheckedIn | PL, no in-org consumer |
| analytics only | DockAppointmentCompleted | Event | Kafka warehouse.dock-scheduling.analytics, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCompleted | PL, no in-org consumer |
| analytics only | DockAppointmentAtRisk | Event | Kafka warehouse.dock-scheduling.analytics, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentAtRisk | PL, no in-org consumer |
| analytics only | DoorOperatingHoursDeclared | Event | Kafka warehouse.dock-scheduling.analytics, com.warehouse.wms.dock-scheduling.dockcalendar.DoorOperatingHoursDeclared | PL, no in-org consumer |
| none | (no synchronous calls) | n/a | sync_calls: [] | n/a |
Full message details: Domain Events. Relationship evidence: Context Map.
Ubiquitous Language
Full glossary: Ubiquitous Language. Top terms: Dock Appointment, Door Window, Door Calendar, Closure, Arrival Status, No-Show.
Business Decisions
- One owner of door time. Inbound and outbound appointments share one
calendar per door; a door whose
dockFlowisBothtakes either direction. - No overlap. No two active (
BOOKEDorCHECKED_IN) appointments overlap on the same door; windows are half-open (ErrDoorDoubleBooked, enforced by domain serviceDoorSchedule.CheckNoOverlapunder a per-door advisory lock). - Direction fits the door.
ErrDoorFlowMismatch. - Inside hours, outside closures.
ErrDoorUnavailable. - Physical facts are applied, never recorded. Arrival and door release
come from
yard-managementevents. - No-show. A
BOOKEDappointment with no arrival bywindow_endplus the site's no-show grace becomesNO_SHOW. - Late ETA is advisory.
DockAppointmentAtRisk; nothing reschedules automatically.
Assumptions
Each is an assumption of the model or of this pack's reading; the service's ADR 0002 and ADR 0003 state the ones it relies on.
facility-layoutpublishes every dock slot with itsdockFlowand itszoneId, and every zone with itssiteCode; a door reaches its site only through that join, never by parsing a location code (conventions.site_key).inbound-receivingpublishesASNRegisteredbefore an appointment names that ASN; otherwise a booking is refused withErrUnknownAsn.process-path-managementpublishesCPTScheduleChangedfor a site before an outbound appointment names one of itscpt_idvalues.- Yard events can arrive in any order across partitions (they are keyed by
visit or trailer, not by appointment);
OutOfOrderYardFactsis the rule that absorbs it. - Consumers rebuild their views from events only; no sibling is called synchronously.
- The retail network is out of reach: no
retailnetwork.*topic is consumed.
Verification Metrics
Targets are this page's proposal; neither the model nor the service sets any. The service exports the counters named below (for example dock_scheduling_ignored_facts_total and dock_scheduling_implicit_arrivals_total).
| Metric | Target (proposed) | Source |
|---|---|---|
Active appointments that overlap on one door and are not flagged DOOR_REASSIGNED_OVERLAP | 0 | dock_appointments table, ActualDoorWins is the only allowed overlap |
Share of appointments by ArrivalStatus (EARLY, ON_TIME, LATE) and by NO_SHOW, per site and carrier | report weekly | AdherenceReport |
BOOKED appointments past window_end plus no-show grace | 0 after each sweep | dock_appointments table |
DockAppointmentAtRisk per ETA report, by cause | report weekly | analytics topic |
Yard facts ignored and counted (unknown, terminal, CANCELLED, NO_SHOW) | trend to 0 | use-case counter (policies ArrivalFromGate, OutOfOrderYardFacts) |
Bookings refused, by Err... (ErrDoorDoubleBooked, ErrDoorUnavailable, ErrUnknownAsn) | report weekly | use-case error counter |
Appointments completed with an implicit arrival (BOOKED to COMPLETED) | trend to 0 | dock_appointments table |
Lag from a yard-management event to the matching dock-scheduling event | set before build | event timestamps |
Closed questions
The gaps this page used to list (DS-G01 to DS-G22) were decided before the build and are
folded into the service; the decision per gap is in the
Model Gap Register. In short: the arrival
tolerance travels on Booked and Rescheduled (DS-G01); VisitRejected cancels with
TURNED_AWAY (DS-G02); one appointment covers one trailer (DS-G03); PickupFromCutoffs
is phase 2 and only the schedule is stored (DS-G04, DS-G05); a reschedule may change the
door (DS-G06); the calendar is created lazily and open 24x7 until hours are declared
(DS-G07); the legacy import (removed in dock-scheduling ADR 0011) enforced nothing (DS-G08); the planner may cancel and
reschedule (DS-G10); the aggregate exposes atRisk (DS-G11); a decommissioned door blocks
new bookings only and new hours that strand an appointment are refused (DS-G12, DS-G13);
door codes are globally unique (DS-G15); NO_SHOW is terminal, a late carrier books anew
(DS-G16); 409 for conflicts and 422 for value rules (DS-G17).