warehouse-planning Domain Events 0.9.0

Event catalog for the warehouse-planning bounded context (WES subdomain): can this warehouse process the demand assigned to it?

Published (Phase 4). The CapacityPlan aggregate raises four events, published to warehouse.warehouse-planning.events through a transactional outbox: the plan and its already-encoded events are written in ONE database transaction, and a relay drains them to Kafka (at-least-once; the CloudEvents id is persisted with the outbox row, so a retry republishes the same id -- consumers dedupe on it). Per plan: CapacityPlanCreated on creation; on publication CapacityPlanPublished, plus CapacityShortageDetected and BottleneckDetected only when the plan has a shortage. Publishing a plan supersedes the plan published before it for the same site, location, path and window (ADR 0024 decision 3): CapacityPlanSuperseded of that OLDER plan is queued first, in the same transaction. The ProcessCapacity aggregate publishes on the same topic and the same outbox: ProcessCapacityRegistered when its first (native) constraint brings it into being, ProcessCapacityChanged when a registration moves the effective rate (the minimum rate value, the binding constraint, or both); a registration the effective rate does not notice raises nothing. ProcessCapacity events are integration-stream only: the analytics fanout carries plan facts only (ADR 0005).

Published (ADR 0023). The workload forecast and the shift labour plan moved here from wes-work-planning. WorkloadForecastReceived (entity workloadforecast, key site_id/path_id) is raised by every receipt that changed a forecast; LabourPlanCommitted (entity labourplan, key site_id/shift_id/path_id) by every commit that changed a labour plan, carrying every field of the plan (workforce-management keeps a copy and applies a message only when its version is greater than the stored one); LabourPlanDriftDetected (same entity and key) when the heads workforce-management committed differ from the plan's and the drift is new. A PUT that changes nothing raises nothing. All three are written to BOTH topics through the same outbox, with the same payload on each.

Consumed (Phase 3). ShiftPlanCommitted (workforce-management) and LocationSlotRegistered/LocationSlotDecommissioned (facility-layout) keep local ProcessCapacity read models current; this context never makes a live cross-context call.

Consumed (ADR 0004). OrderAllocated and OrderPartiallyAllocated (order-management, topic warehouse.order-management.events) keep a local expected-demand read model current under the REQUIRED consumer group DEMAND_CONSUMER_GROUP. Each order is counted once, at its latest promise cutoff, and attributed to the event's own optional site_id (order-management ADR 0050), or to the configured fallback site (DEMAND_SITE_ID) when the event carries none (ADR 0021). OrderRepromised and every other type are ignored.

Consumed (ADR 0017, source switched by ADR 0020). dock-scheduling's DockAppointmentBooked, DockAppointmentRescheduled, DockAppointmentCancelled and DockAppointmentNoShow (topic warehouse.dock-scheduling.events, group DOCK_APPOINTMENT_CONSUMER_GROUP) keep a local inbound-demand read model current: a capacity plan carries the INBOUND dock appointments of its window and the labour the operator-declared inbound standard attributes to them. Each appointment is attributed to the site_id of its events; the producer's aggregate version orders them (a Cancelled that arrives before its Booked wins). inbound-receiving's appointment events are NO LONGER consumed, and a deployment that still sets INBOUND_DEMAND_CONSUMER_GROUP is refused at boot. TaskCompleted (fulfillment-execution, topic warehouse.fulfillment.events, group OBSERVED_CAPACITY_CONSUMER_GROUP) keeps a local observed-capacity read model current that feeds an ADVISORY planned-versus-observed variance; it never changes a planned capacity and is attributed to the configured site (DEMAND_SITE_ID). Both consumers dead-letter unusable payloads to <topic>.dlq.

Consumed (ADR 0022). labor-performance's LaborStandardDefined and LaborStandardRevised (topic warehouse.labor-performance.events, its INTEGRATION topic per its ADR 0038; group LABOR_STANDARD_CONSUMER_GROUP) keep a local copy of the engineered labour standards, one record per standard_id. A capacity plan prices each step of its path with the standard of its task type in force for the plan's site at the window start (labour_requirement, REST and MCP only: no event this service publishes carries it). Every other type on that topic is ignored, the producer's analytics topic is never read, and an unusable payload is dead-lettered to warehouse.labor-performance.events.dlq.

Consumed (ADR 0025). process-path-management's ProcessFlowDefined, ProcessFlowRevised and ProcessFlowRetired (topic warehouse.process-path-management.events, its INTEGRATION topic; group PROCESS_FLOW_CONSUMER_GROUP) keep a local copy of the process flows, one row per flow_id. Every message is the FULL state of the flow and carries its version; it is applied only when its version is greater than the stored one, so a redelivery, the producer's startup republish and a reordered message are harmless. The path capacity resolves a path_id from an ACTIVE flow first (its steps are the stages' process_type values in order) and falls back to the locally declared path; the REST and MCP reads of a path carry a read-only source (flow or local). Every other type on that topic is ignored, the producer's analytics topic is never read, and an unusable payload (an unknown process_type, no stages, a bad status or version) is dead-lettered to warehouse.process-path-management.events.dlq.

Analytics stream (ADR 0005). The same four events are ALSO written to warehouse.warehouse-planning.analytics in the SAME outbox transaction (two outbox rows per event, one per topic), as CloudEvents 1.0 with the SAME type and the SAME id per occurrence but dataschema=urn:warehouse:warehouse-planning:analytics:<EventName>:v1. The three ADR 0023 events get the same analytics copy, with the integration payload unchanged; the projector does not project them yet (it acknowledges and ignores them). The integration messages are byte-identical to what they were before the stream existed. The analytics payloads are the integration payloads plus additive, analytics-only fields: today binding_constraint on CapacityPlanPublished (the constraint type -- LABOR, STATION, ... -- binding the bottleneck step; "" for a plan created before it was recorded). Only this service's own planning-projector consumes it (fixed consumer group, at-least-once, offsets committed after the projection committed), into a SEPARATE analytical database that planning-reports serves read-only. Poison messages go to warehouse.warehouse-planning.analytics.dlq.

Envelope (mandatory). Every message is a CloudEvents 1.0 event in structured content mode (Kafka value = JSON event format) with the Kafka header content-type: application/cloudevents+json; charset=UTF-8. Optional W3C trace-context headers (traceparent, and tracestate / baggage when present) carry the trace of the request that wrote the outbox row (ADR 0014); consumers may extract them, and must not require them. All of specversion (1.0), id, source (/warehouse/warehouse-planning), type, subject, time, datacontenttype (application/json) and dataschema are required; the payload sits under data. No flat envelope, no toggle.

Type naming. com.warehouse.wes.warehouse-planning.<entity>.<EventName> where <entity> is the aggregate that raised the event, lowercase, no separators -- capacityplan, processcapacity, workloadforecast or labourplan. dataschema = urn:warehouse:warehouse-planning:events:<EventName>:v1. subject and the Kafka message key = the aggregate's id: the capacity plan id, <processType>/<location>/<windowStart>/<windowEnd> for a ProcessCapacity, <site_id>/<path_id> for a WorkloadForecast, or <site_id>/<shift_id>/<path_id> for a LabourPlan (one aggregate's events stay ordered on one partition). A breaking payload change gets a new .v2 type and dataschema, never a mutation.

  • #warehouse-planning
  • #capacity-plan
  • #process-capacity
  • #workload-forecast
  • #labour-plan
  • #consumed
  • #analytics

Servers

  • {brokers}kafkaproduction

    Fleet-shared Kafka broker (host supplied by the deployment environment).

    object
    string
    required
    Security:
    security.protocol:PLAINTEXT

Operations

  • SUB warehouse.warehouse-planning.events

    This service's integration topic (Topic in internal/adapters/outbound/kafka/encoder.go). Written by the outbox relay; key = the raising aggregate's id (plan id, processType/location/window for a ProcessCapacity, site_id/path_id for a WorkloadForecast, site_id/shift_id/path_id for a LabourPlan); every message carries the content-type: application/cloudevents+json; charset=UTF-8 header (plus the optional W3C traceparent of the writing request, ADR 0014). Dispatch on the full type, ignore unknown types, dedupe on id.

    Receive CapacityPlan, ProcessCapacity, WorkloadForecast and LabourPlan events.

    Subscribe to this service's event stream. Route on the full type: com.warehouse.wes.warehouse-planning.capacityplan.<EventName> for CapacityPlan events, com.warehouse.wes.warehouse-planning.processcapacity.<EventName> for ProcessCapacity events, com.warehouse.wes.warehouse-planning.workloadforecast.<EventName> for WorkloadForecast events and com.warehouse.wes.warehouse-planning.labourplan.<EventName> for LabourPlan events.

    Operation IDreceiveWarehousePlanningEvents

    Available only on servers:

    • #capacity-plan
    • #process-capacity
    • #workload-forecast
    • #labour-plan

    Accepts one of the following messages:

    • #0Capacity plan created

      A DRAFT CapacityPlan was created with its computed shortage.

      Raised by the CapacityPlan aggregate on POST /capacity-plans and queued in the transactional outbox in the same transaction as the plan. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanCreated, subject and Kafka key = the plan id.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanCreated.

      • #capacity-plan
      • #warehouse-planning

      Examples

    • #1Capacity plan published

      A DRAFT CapacityPlan was published.

      Raised by CapacityPlan.Publish on POST /capacity-plans/{id}/publications. Always accompanied by CapacityShortageDetected and BottleneckDetected when the plan has a shortage. A plan is published at most once. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanPublished.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanPublished.

      • #capacity-plan
      • #warehouse-planning

      Examples

    • #2Capacity shortage detected

      Published demand exceeds the path capacity over the window.

      Raised at publish time, ONLY when shortage > 0 (demand exactly equal to the capacity over the window is not a shortage). type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityShortageDetected.

      allOf

      CloudEvents 1.0 envelope of CapacityShortageDetected.

      • #capacity-plan
      • #warehouse-planning

      Examples

    • #3Bottleneck detected

      Names the path step limiting end-to-end flow of a plan with a shortage.

      Raised at publish time together with CapacityShortageDetected, ONLY when the plan has a shortage. type = com.warehouse.wes.warehouse-planning.capacityplan.BottleneckDetected.

      allOf

      CloudEvents 1.0 envelope of BottleneckDetected.

      • #capacity-plan
      • #warehouse-planning

      Examples

    • #4Capacity plan superseded

      A newer plan of the same site, location, path and window was published; this plan is SUPERSEDED.

      Raised when a plan is published while another PUBLISHED plan exists for the same (site_id, location, path_id, window_start, window_end) (ADR 0024 decision 3). subject, the Kafka key and data.plan_id are the OLDER plan, the one superseded; superseded_by is the newer plan. Queued in the same transaction as, and BEFORE, the newer plan's CapacityPlanPublished (then CapacityShortageDetected and BottleneckDetected when it is short). SUPERSEDED is terminal: a plan is superseded at most once and never published again. It carries the older plan's identity and no quantities. Plans migration 0017 marked SUPERSEDED when it backfilled a database holding several PUBLISHED plans of one key raised NO event. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanSuperseded.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanSuperseded.

      • #capacity-plan
      • #warehouse-planning

      Examples

    • #5Process capacity registered

      The first constraint brought a ProcessCapacity into being.

      Raised by ProcessCapacity.AddConstraint when the FIRST constraint of (processType, location, window) is registered -- the one that establishes the native unit; its rate is the effective rate at that moment. Raised on POST /process-capacities and by the labor-capacity consumer, queued in the transactional outbox in the same transaction as the aggregate. type = com.warehouse.wes.warehouse-planning.processcapacity.ProcessCapacityRegistered; subject and Kafka key = <processType>/<location>/<windowStart>/<windowEnd>.

      allOf

      CloudEvents 1.0 envelope of ProcessCapacityRegistered.

      • #process-capacity
      • #warehouse-planning

      Examples

    • #6Process capacity changed

      A registration moved a ProcessCapacity's effective rate.

      Raised by ProcessCapacity.AddConstraint when a registration (new or re-registered) changes the effective rate: the minimum rate value, the binding constraint, or both. A registration that leaves the effective rate untouched raises nothing. type = com.warehouse.wes.warehouse-planning.processcapacity.ProcessCapacityChanged.

      allOf

      CloudEvents 1.0 envelope of ProcessCapacityChanged.

      • #process-capacity
      • #warehouse-planning

      Examples

    • #7Workload forecast received

      A receipt replaced the CPT buckets of a (site, path) workload forecast.

      Raised by the WorkloadForecast aggregate on PUT /workload-forecasts/{site_id}/{path_id} when the receipt changed the buckets (a receipt equal to the stored one raises nothing), and queued in the transactional outbox in the same transaction as the forecast. It carries the totals, not the buckets. type = com.warehouse.wes.warehouse-planning.workloadforecast.WorkloadForecastReceived; subject and Kafka key = <site_id>/<path_id>. A superset of wes-work-planning's retired ChargeForecastReceived (ADR 0023 decision 1).

      allOf

      CloudEvents 1.0 envelope of WorkloadForecastReceived.

      • #workload-forecast
      • #warehouse-planning

      Examples

    • #8Labour plan committed

      The heads a process path needs for one shift at one site were committed or revised.

      Raised by the LabourPlan aggregate on PUT /labour-plans/{site_id}/{shift_id}/{path_id} when the commit created or changed the plan (a PUT that changes nothing raises nothing and keeps the version), queued in the transactional outbox in the same transaction as the plan. Carries every field of the plan. planned_heads is the caller's (heads_source request) or derived from the stored workload forecast as ceil(units due in [shift_start, shift_start + hours) / (rate_units_per_hour x hours)) (heads_source forecast). shift_start is OMITTED (not null) when the plan has none. workforce-management keeps a copy (its ADR 0043) and applies a message only when its version is greater than the stored one. type = com.warehouse.wes.warehouse-planning.labourplan.LabourPlanCommitted; subject and Kafka key = <site_id>/<shift_id>/<path_id> (ADR 0023 decision 2).

      allOf

      CloudEvents 1.0 envelope of LabourPlanCommitted.

      • #labour-plan
      • #warehouse-planning

      Examples

    • #9Labour plan drift detected

      The heads workforce-management committed for a (site, shift, path) differ from the labour plan.

      Raised when the committed heads (workforce-management's ShiftPlanCommitted) differ from the labour plan's planned_heads for the same (site_id, shift_id, path_id) and the drift is new: non-zero and different from the last drift recorded for that key. It never corrects either side. drift_heads = committed_heads - planned_heads (positive when workforce committed more heads than the plan requires). type = com.warehouse.wes.warehouse-planning.labourplan.LabourPlanDriftDetected; subject and Kafka key = <site_id>/<shift_id>/<path_id> (ADR 0023 decision 3).

      allOf

      CloudEvents 1.0 envelope of LabourPlanDriftDetected.

      • #labour-plan
      • #warehouse-planning

      Examples

  • SUB warehouse.warehouse-planning.analytics

    This service's analytics topic (AnalyticsTopic in internal/adapters/outbound/kafka/analytics_encoder.go; ADR 0005). Written by the SAME outbox relay, from rows inserted in the same transaction as the integration rows; key = the raising aggregate's id, as on the integration topic. Consumed ONLY by this service's planning-projector under a fixed consumer group read from env ANALYTICS_CONSUMER_GROUP (at-least-once; the offset is committed after the projection and the dedupe mark committed together in the analytical database). The projector dedupes on id, ignores unknown types, skips (with a rate-limited WARN) anything that is not CloudEvents 1.0, and dead-letters a known type with an unusable payload to warehouse.warehouse-planning.analytics.dlq (raw bytes plus x-dlq-* headers). Not an integration contract: other contexts consume the integration topic.

    Receive the CapacityPlan, WorkloadForecast and LabourPlan analytics events.

    Route on the full type; the payloads are the integration payloads plus the additive analytics-only fields documented per message (none on the WorkloadForecast and LabourPlan copies). The projector folds the four CapacityPlan types and acknowledges every other type unprojected (CapacityPlanSuperseded included).

    Operation IDreceiveCapacityPlanAnalyticsEvents

    Available only on servers:

    • #analytics

    Accepts one of the following messages:

    • #0Capacity plan created (analytics stream)

      The analytics copy of CapacityPlanCreated.

      Same type, same id, same payload as the integration CapacityPlanCreated; only dataschema differs (urn:warehouse:warehouse-planning:analytics:CapacityPlanCreated:v1). The projector uses the CloudEvents time as the plan's creation instant.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanCreated on the analytics topic.

      • #analytics

      Examples

    • #1Capacity plan published (analytics stream)

      The analytics copy of CapacityPlanPublished, plus binding_constraint.

      Same type and id as the integration CapacityPlanPublished; the payload adds binding_constraint (additive, analytics-only): the constraint type binding the bottleneck step, which the bottleneck-frequency report groups by. The projector uses the CloudEvents time as the plan's publication instant.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanPublished on the analytics topic.

      • #analytics

      Examples

    • #2Capacity shortage detected (analytics stream)

      The analytics copy of CapacityShortageDetected.

      Same type, id and payload as the integration CapacityShortageDetected; only dataschema differs.

      allOf

      CloudEvents 1.0 envelope of CapacityShortageDetected on the analytics topic.

      • #analytics

      Examples

    • #3Bottleneck detected (analytics stream)

      The analytics copy of BottleneckDetected.

      Same type, id and payload as the integration BottleneckDetected; only dataschema differs.

      allOf

      CloudEvents 1.0 envelope of BottleneckDetected on the analytics topic.

      • #analytics

      Examples

    • #4Capacity plan superseded (analytics stream)

      The analytics copy of CapacityPlanSuperseded.

      Same type, id and payload as the integration CapacityPlanSuperseded; only dataschema differs. The projector acknowledges it unprojected.

      allOf

      CloudEvents 1.0 envelope of CapacityPlanSuperseded on the analytics topic.

      • #analytics

      Examples

    • #5Workload forecast received (analytics stream)

      The analytics copy of WorkloadForecastReceived.

      Same type, same id, same payload as the integration WorkloadForecastReceived; only dataschema differs (urn:warehouse:warehouse-planning:analytics:WorkloadForecastReceived:v1). The projector acknowledges it without projecting it.

      allOf

      CloudEvents 1.0 envelope of WorkloadForecastReceived on the analytics topic.

      • #analytics

      Examples

    • #6Labour plan committed (analytics stream)

      The analytics copy of LabourPlanCommitted.

      Same type, same id, same payload as the integration LabourPlanCommitted (with shift_start omitted when the plan has none); only dataschema differs (urn:warehouse:warehouse-planning:analytics:LabourPlanCommitted:v1). The projector acknowledges it without projecting it.

      allOf

      CloudEvents 1.0 envelope of LabourPlanCommitted on the analytics topic.

      • #analytics

      Examples

    • #7Labour plan drift detected (analytics stream)

      The analytics copy of LabourPlanDriftDetected.

      Same type, same id, same payload as the integration LabourPlanDriftDetected; only dataschema differs (urn:warehouse:warehouse-planning:analytics:LabourPlanDriftDetected:v1). The projector acknowledges it without projecting it.

      allOf

      CloudEvents 1.0 envelope of LabourPlanDriftDetected on the analytics topic.

      • #analytics

      Examples

  • PUB warehouse.workforce.events

    workforce-management's integration topic (LaborTopic). This service consumes it with its own consumer group (env LABOR_CAPACITY_CONSUMER_GROUP). Only ShiftPlanCommitted is acted on; every other type, a message that is not CloudEvents 1.0, or an unusable payload is skipped (WARN) and its offset committed. A transient failure is retried up to 5 attempts, then the message is published to warehouse.workforce.events.dlq (raw bytes plus x-dlq-* headers).

    Consume workforce-management's ShiftPlanCommitted.

    Consumed by this service: one message per PathPlan line becomes a LABOR capacity constraint. Offsets are committed only after the effect and its idempotency claim committed atomically.

    Operation IDconsumeShiftPlanCommitted

    Available only on servers:

    • #consumed

    Accepts the following message:

    Shift plan committed (consumed)

    workforce-management committed a headcount split for a path.

    CONSUMED from warehouse.workforce.events (producer: workforce-management; one message per PathPlan line). Becomes a LABOR CapacityConstraint on the ProcessCapacity of ProcessType = upper-case(path_id), location = site_code, or the deprecated building_id when site_code is absent (ADR 0021): rate = planned_heads * planned_rate (UNIT/HOUR), window = [time, time + planned_hours). Deduped on the CloudEvents id. A line with a shift_id then records its committed heads (planned_heads) for (site, shift_id, path_id) and, when a labour plan exists for that key and the drift is news, raises LabourPlanDriftDetected, in the same unit of work as the claim and the LABOR constraint (ADR 0023 decision 3). path_id is matched case-insensitively: the committed heads are keyed on its canonical form (trimmed, upper case), the form the labour plan is keyed on, so a line for pack meets the plan PUT as PACK. A line without shift_id records no committed heads.

    allOf

    CloudEvents 1.0 envelope of workforce-management's ShiftPlanCommitted (consumed).

    • #consumed
    • #warehouse-planning

    Examples

  • PUB warehouse.facility.events

    facility-layout's integration topic (FacilityTopic). This service consumes it with its own consumer group (env STORAGE_CAPACITY_CONSUMER_GROUP). Only LocationSlotRegistered and LocationSlotDecommissioned are acted on; every other type, a message that is not CloudEvents 1.0, or an unusable payload is skipped (WARN) and its offset committed. A transient failure is retried up to 5 attempts, then the message is published to warehouse.facility.events.dlq (raw bytes plus x-dlq-* headers).

    Consume facility-layout's location slot events.

    Consumed by this service: storage positions (per zone + locationType) and work-center stations (per zone + activity) are tallied. The consumer only maintains that tally -- it registers no ProcessCapacity constraint. Station counts are composed with labor and the operator-declared station standard at read time, and positions are a read model (GET /storage-capacity); see docs/adr/0002-station-capacity-composition.md.

    Operation IDconsumeLocationSlotEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0Location slot registered (consumed)

      facility-layout registered a storage position or a work center.

      CONSUMED from warehouse.facility.events (producer: facility-layout). Tallied per (zoneId, locationType) as storage positions (role Storage), or per zone + activity as stations (role WorkCenter). A zone belongs to the site (planning location) named by its zone id's first dash-separated segment. Deduped on the CloudEvents id.

      allOf

      CloudEvents 1.0 envelope of facility-layout's LocationSlotRegistered (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #1Location slot decommissioned (consumed)

      facility-layout decommissioned a position.

      CONSUMED from warehouse.facility.events (producer: facility-layout). Decrements the tally the matching LocationSlotRegistered incremented; an untracked locationCode is logged and ignored.

      allOf

      CloudEvents 1.0 envelope of facility-layout's LocationSlotDecommissioned (consumed).

      • #consumed
      • #warehouse-planning

      Examples

  • PUB warehouse.order-management.events

    order-management's integration topic (OrderTopic). This service consumes it with a STABLE consumer group read from env DEMAND_CONSUMER_GROUP (REQUIRED, no default; ADR 0016). Only OrderAllocated and OrderPartiallyAllocated are acted on; every other CloudEvents type -- OrderRepromised included -- is ignored, and a message that is not a valid CloudEvent is skipped (WARN), never blocking the partition.

    Consume order-management's order allocation events.

    Consumed by this service into a LOCAL expected-demand read model (order_demand, one row per order id; GET /demand, get_expected_demand, and the default of POST /capacity-plans assigned_demand). An order is demand in a window [start, end) when its promise_date (the promise cutoff) is at or after start and strictly before end. Last writer wins per order id on the CloudEvents time (a later or equal time replaces, an older one is a no-op). The idempotency claim on the CloudEvents id and the upsert commit in ONE database transaction; the offset is committed only afterwards. order- management's events carry no quantities and no cancellations (OrderCancelled is analytics-topic only), so demand is counted in ORDERS and not netted; see docs/adr/0004-demand-ingestion-from-order-management.md. An order is attributed to the event's optional site_id, or to the configured fallback site DEMAND_SITE_ID when it carries none (docs/adr/0021-order-demand-and-labour-read-the-events-own-site.md).

    Operation IDconsumeOrderAllocationEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0Order allocated (consumed)

      order-management allocated every line of an order and released the eligible ones.

      CONSUMED from warehouse.order-management.events (producer: order-management, its own apis/asyncapi.yaml). Upserts the order into the expected-demand read model: promise cutoff = data.promise_date, released lines = len(data.lines), site = data.site_id, or the configured DEMAND_SITE_ID when it is absent or blank (ADR 0021). subject must equal data.order_id. Deduped on the CloudEvents id; last writer wins per order on time. type = com.warehouse.wes.order-management.order.OrderAllocated.

      allOf

      CloudEvents 1.0 envelope of order-management's OrderAllocated (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #1Order partially allocated (consumed)

      Some lines of a partial-shipment order were allocated and released, some backordered.

      CONSUMED from warehouse.order-management.events. Same payload shape and the same effect as OrderAllocated (data.lines carries exactly the lines released in that pass); a later OrderAllocated for the same order replaces it. type = com.warehouse.wes.order-management.order.OrderPartiallyAllocated.

      allOf

      CloudEvents 1.0 envelope of order-management's OrderPartiallyAllocated (consumed).

      • #consumed
      • #warehouse-planning

      Examples

  • PUB warehouse.dock-scheduling.events

    dock-scheduling's integration topic (DockSchedulingTopic, key = appointment id for appointment events). This service consumes it with a STABLE consumer group read from env DOCK_APPOINTMENT_CONSUMER_GROUP (REQUIRED, no default; ADR 0016/0020). Only DockAppointmentBooked, DockAppointmentRescheduled, DockAppointmentCancelled and DockAppointmentNoShow are acted on, dispatched on the FULL type string; every other type on the topic (door calendar events, and the retired com.warehouse.wms.inbound-receiving.dockappointment.* types) is ignored. The analytics-only appointment events (checked-in, door reassigned, completed, at risk) are published to the producer's analytics topic and never reach this one. A message that is not CloudEvents 1.0, or a known type with an unusable payload, is published to warehouse.dock-scheduling.events.dlq (raw bytes plus x-dlq-* headers).

    The previous source, inbound-receiving's warehouse.inbound-receiving.events and the env INBOUND_DEMAND_CONSUMER_GROUP, is retired by ADR 0020: setting that variable is a boot error naming DOCK_APPOINTMENT_CONSUMER_GROUP.

    Consume dock-scheduling's dock appointment events.

    Consumed by this service into a LOCAL inbound-demand read model (inbound_appointments, one row per appointment id; GET /inbound-demand, get_inbound_demand, the inbound figures on a capacity plan). Only INBOUND appointments (data.direction) are demand; OUTBOUND ones are stored and never counted. An appointment is demand in a window [start, end) when it is BOOKED and its door window STARTS at or after start and strictly before end. A Rescheduled moves the window; a Cancelled and a NoShow remove the demand (both are terminal on the producer). Each appointment is attributed to the data.site_id of its events (a facility-layout siteCode): there is no configured site on this path.

    Ordering: every event carries the aggregate data.version (starts at 1, +1 per accepted change). The state (status, window, version) changes only when the event's version is GREATER than the stored one, so a redelivery, a duplicate or an older event changes nothing. The booking facts only a Booked carries (direction, ASN count) are filled in whenever they arrive, so a Cancelled or Rescheduled that arrives before its Booked is stored as a partial row (a tombstone) that the Booked then completes without resurrecting it or moving the window back. Rows written by the retired inbound-receiving source are INBOUND at version 0, so any dock-scheduling event for the same appointment id supersedes them.

    The idempotency claim on the CloudEvents id and the upsert commit in ONE database transaction; the offset is committed only afterwards. This consumer raises no event of its own. The labour minutes are NOT in the event: they come from the operator-declared inbound labour standard. See docs/adr/0017-inbound-labour-demand-and-observed-capacity-feedback.md and docs/adr/0020-inbound-demand-from-dock-scheduling.md.

    Operation IDconsumeDockAppointmentEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0Dock appointment booked (consumed)

      dock-scheduling booked a door window for a carrier.

      CONSUMED from warehouse.dock-scheduling.events (producer: dock-scheduling; the data is the superset contract of the yard-management plan). Stores the appointment in the local inbound-demand read model (inbound_appointments, one row per data.appointment_id): site = data.site_id, direction, door window start/end and ASN count = len(data.asn_numbers). subject must equal data.appointment_id. Version-guarded: the window and status are written only when data.version is greater than the stored version; the direction and ASN count are filled in when the row lacks them. Deduped on the CloudEvents id. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked.

      allOf

      CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentBooked (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #1Dock appointment rescheduled (consumed)

      dock-scheduling moved a booked appointment to another door window.

      CONSUMED from warehouse.dock-scheduling.events. Moves the appointment's demand to data.window_start / data.window_end (the previous window and the door are ignored) when data.version is greater than the stored version. Carries no direction and no ASNs: arriving before its Booked it is stored as a partial row that is not demand until the Booked supplies the direction. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled.

      allOf

      CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentRescheduled (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #2Dock appointment cancelled (consumed)

      dock-scheduling cancelled a booked appointment.

      CONSUMED from warehouse.dock-scheduling.events. Removes the appointment's demand: the row flips to CANCELLED and stops counting (terminal on the producer). A Cancelled that arrives BEFORE its Booked is stored as a tombstone (no window) that no Booked of an older version can resurrect. Idempotent: a redelivered id or a version that is not greater than the stored one is a no-op. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled.

      allOf

      CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentCancelled (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #3Dock appointment no-show (consumed)

      dock-scheduling marked a booked appointment as not shown.

      CONSUMED from warehouse.dock-scheduling.events. Removes the appointment's demand exactly like a Cancelled (the row flips to NO_SHOW; terminal on the producer: a late carrier needs a new booking). Carries the direction, so even a NoShow that arrives before its Booked is stored with a known direction. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow.

      allOf

      CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentNoShow (consumed).

      • #consumed
      • #warehouse-planning

      Examples

  • PUB warehouse.fulfillment.events

    fulfillment-execution's integration topic (FulfillmentTopic, key = task id). This service consumes it with a STABLE consumer group read from env OBSERVED_CAPACITY_CONSUMER_GROUP (REQUIRED, no default; ADR 0016/0017). Only TaskCompleted is acted on; every other type is ignored. A message that is not CloudEvents 1.0, or a TaskCompleted without task_id/task_type, is published to warehouse.fulfillment.events.dlq (raw bytes plus x-dlq-* headers).

    Consume fulfillment-execution's TaskCompleted.

    Consumed by this service into a LOCAL observed-capacity read model (observed_capacity, one row per location + process type + minute; additive). It feeds the ADVISORY planned-versus-observed variance (GET /capacity-plans/{id}/variance, get_capacity_plan_variance); it never changes a planned capacity and never republishes a plan. The idempotency claim on the CloudEvents id and the upsert commit in ONE transaction, so a redelivered event adds nothing. See docs/adr/0017-inbound-labour-demand-and-observed-capacity-feedback.md.

    Operation IDconsumeTaskCompletedEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    Task completed (consumed)

    fulfillment-execution reports that a station completed a task.

    CONSUMED from warehouse.fulfillment.events (producer: fulfillment-execution, its own apis/asyncapi.yaml). Adds the completion to the local observed_capacity read model: one row per (location, process_type = upper-cased data.task_type, minute of the CloudEvents time) with the task count and the duration total. Site = the configured DEMAND_SITE_ID. The idempotency claim on the CloudEvents id and the additive upsert commit in ONE transaction, so a redelivered id adds nothing. A completion without task_type or task_id is dead-lettered. Only the fields below are read; the enrichment fields fulfillment-execution adds (work_unit_id, associate_id, relocation fields) are ignored. type = com.warehouse.wes.fulfillment-execution.task.TaskCompleted.

    allOf

    CloudEvents 1.0 envelope of fulfillment-execution's TaskCompleted (consumed).

    • #consumed
    • #warehouse-planning

    Examples

  • PUB warehouse.labor-performance.events

    labor-performance's integration topic (LaborPerformanceTopic; the standard events are keyed by task type, labor-performance ADR 0038). This service consumes it with a STABLE consumer group read from env LABOR_STANDARD_CONSUMER_GROUP (REQUIRED, no default; ADR 0016/0022). Only the full types com.warehouse.wes.labor-performance.standard.LaborStandardDefined and ...standard.LaborStandardRevised are acted on; every other type (TaskPerformanceRecorded, ...) is ignored. A message that is not CloudEvents 1.0, or a standard without standard_id/task_type/effective_from/event time, with expected_seconds <= 0, a negative travel_component_seconds or an unknown handling_unit, is published to warehouse.labor-performance.events.dlq (raw bytes plus x-dlq-* headers).

    Consume labor-performance's LaborStandardDefined / LaborStandardRevised.

    Consumed by this service into a LOCAL copy of the engineered labour standards (labor_standards, one row per standard_id; additive). The copy stores facts, not a current value: a redelivered or replayed standard_id changes nothing, and the standard that applies to a plan of site S, task type T and window W is resolved at READ time among task-type-only rows (handling_unit absent) with effective_from <= W.start: S's own site_code over a site-less row, then the latest effective_from, then the latest event time. The idempotency claim on the CloudEvents id and the write commit in ONE transaction. See docs/adr/0022-labour-standards-from-labor-performance.md.

    Operation IDconsumeLaborStandardEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0Labour standard defined (consumed)

      labor-performance defined an engineered labour standard for a task type.

      CONSUMED from warehouse.labor-performance.events (producer: labor-performance, its own apis/asyncapi.yaml, ADR 0038: the same payload as its analytics copy). Recorded in the local labor_standards copy under standard_id; as_of = the CloudEvents time. site_code absent = every site. A standard with a handling_unit is stored but not used to price a plan (plan demand has no handling-unit split). type = com.warehouse.wes.labor-performance.standard.LaborStandardDefined.

      allOf

      CloudEvents 1.0 envelope of labor-performance's LaborStandardDefined (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #1Labour standard revised (consumed)

      labor-performance revised a labour standard (a new record under a new standard_id).

      CONSUMED from warehouse.labor-performance.events. A revision closes the prior record in labor-performance and opens a new one, so it is recorded like a definition: a new row, and the latest effective_from before a plan's window start is the standard in force. previous_expected_seconds and the team-lift fields are ignored. type = com.warehouse.wes.labor-performance.standard.LaborStandardRevised.

      allOf

      CloudEvents 1.0 envelope of labor-performance's LaborStandardRevised (consumed).

      • #consumed
      • #warehouse-planning

      Examples

  • PUB warehouse.process-path-management.events

    process-path-management's integration topic (ProcessPathManagementTopic; the flow events are keyed by flow_id, its ADR 0042). This service consumes it with a STABLE consumer group read from env PROCESS_FLOW_CONSUMER_GROUP (REQUIRED, no default; ADR 0016/0025). Only the full types com.warehouse.wes.process-path-management.processflow.ProcessFlowDefined, ...processflow.ProcessFlowRevised and ...processflow.ProcessFlowRetired are acted on; every other type (ProcessPathCreated, ProcessPathUpdated, ProcessPathDeactivated, CPTScheduleChanged) is acknowledged and ignored. A message that is not CloudEvents 1.0, or a flow without flow_id, without stages, with a stage without path_id or with a process_type outside PICK, REBIN, PACK, SLAM, DISPATCH, ARRIVAL, RELOCATE, REPLENISH, a status other than ACTIVE or RETIRED, a version below 1 or no event time, is published to warehouse.process-path-management.events.dlq (raw bytes plus x-dlq-* headers) and never applied.

    Consume process-path-management's ProcessFlowDefined / ProcessFlowRevised / ProcessFlowRetired.

    Consumed by this service into a LOCAL copy of the process flows (process_flows, one row per flow_id; additive). Each message is the full state of the flow; it is applied ONLY when its version is greater than the stored one (equal or lower is acknowledged and changes nothing; a first message of any of the three types for an unknown flow is stored, a Retired one as a RETIRED row). The idempotency claim on the CloudEvents id and the write commit in ONE transaction. See docs/adr/0025-process-flows-from-process-path-management.md.

    Operation IDconsumeProcessFlowEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0Process flow defined (consumed)

      process-path-management defined a process flow (version 1).

      CONSUMED from warehouse.process-path-management.events (producer: process-path-management, its own apis/asyncapi.yaml, ADR 0042). The FULL state of the flow at its version; applied to the local process_flows copy only when version is greater than the stored one (a first message for an unknown flow is stored). type = com.warehouse.wes.process-path-management.processflow.ProcessFlowDefined, subject and Kafka key = flow_id.

      allOf

      CloudEvents 1.0 envelope of process-path-management's ProcessFlowDefined (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #1Process flow revised (consumed)

      process-path-management revised a process flow, or republished it at its start.

      CONSUMED from warehouse.process-path-management.events. The FULL new state at the next version; also the producer's startup republish of every ACTIVE flow at its CURRENT version, which a caught-up copy ignores (equal version) and a fresh one learns. type = com.warehouse.wes.process-path-management.processflow.ProcessFlowRevised.

      allOf

      CloudEvents 1.0 envelope of process-path-management's ProcessFlowRevised (consumed).

      • #consumed
      • #warehouse-planning

      Examples

    • #2Process flow retired (consumed)

      process-path-management retired a process flow.

      CONSUMED from warehouse.process-path-management.events. The FULL state with status RETIRED at the next version. A RETIRED flow does not resolve a path id: the locally declared path of that id, if any, is used. type = com.warehouse.wes.process-path-management.processflow.ProcessFlowRetired.

      allOf

      CloudEvents 1.0 envelope of process-path-management's ProcessFlowRetired (consumed).

      • #consumed
      • #warehouse-planning

      Examples

Messages

  • #1Capacity plan created

    A DRAFT CapacityPlan was created with its computed shortage.

    Message IDCapacityPlanCreated

    Raised by the CapacityPlan aggregate on POST /capacity-plans and queued in the transactional outbox in the same transaction as the plan. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanCreated, subject and Kafka key = the plan id.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanCreated.

    • #capacity-plan
    • #warehouse-planning
  • #2Capacity plan published

    A DRAFT CapacityPlan was published.

    Message IDCapacityPlanPublished

    Raised by CapacityPlan.Publish on POST /capacity-plans/{id}/publications. Always accompanied by CapacityShortageDetected and BottleneckDetected when the plan has a shortage. A plan is published at most once. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanPublished.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanPublished.

    • #capacity-plan
    • #warehouse-planning
  • #3Capacity shortage detected

    Published demand exceeds the path capacity over the window.

    Message IDCapacityShortageDetected

    Raised at publish time, ONLY when shortage > 0 (demand exactly equal to the capacity over the window is not a shortage). type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityShortageDetected.

    allOf

    CloudEvents 1.0 envelope of CapacityShortageDetected.

    • #capacity-plan
    • #warehouse-planning
  • #4Bottleneck detected

    Names the path step limiting end-to-end flow of a plan with a shortage.

    Message IDBottleneckDetected

    Raised at publish time together with CapacityShortageDetected, ONLY when the plan has a shortage. type = com.warehouse.wes.warehouse-planning.capacityplan.BottleneckDetected.

    allOf

    CloudEvents 1.0 envelope of BottleneckDetected.

    • #capacity-plan
    • #warehouse-planning
  • #5Capacity plan superseded

    A newer plan of the same site, location, path and window was published; this plan is SUPERSEDED.

    Message IDCapacityPlanSuperseded

    Raised when a plan is published while another PUBLISHED plan exists for the same (site_id, location, path_id, window_start, window_end) (ADR 0024 decision 3). subject, the Kafka key and data.plan_id are the OLDER plan, the one superseded; superseded_by is the newer plan. Queued in the same transaction as, and BEFORE, the newer plan's CapacityPlanPublished (then CapacityShortageDetected and BottleneckDetected when it is short). SUPERSEDED is terminal: a plan is superseded at most once and never published again. It carries the older plan's identity and no quantities. Plans migration 0017 marked SUPERSEDED when it backfilled a database holding several PUBLISHED plans of one key raised NO event. type = com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanSuperseded.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanSuperseded.

    • #capacity-plan
    • #warehouse-planning
  • #6Process capacity registered

    The first constraint brought a ProcessCapacity into being.

    Message IDProcessCapacityRegistered

    Raised by ProcessCapacity.AddConstraint when the FIRST constraint of (processType, location, window) is registered -- the one that establishes the native unit; its rate is the effective rate at that moment. Raised on POST /process-capacities and by the labor-capacity consumer, queued in the transactional outbox in the same transaction as the aggregate. type = com.warehouse.wes.warehouse-planning.processcapacity.ProcessCapacityRegistered; subject and Kafka key = <processType>/<location>/<windowStart>/<windowEnd>.

    allOf

    CloudEvents 1.0 envelope of ProcessCapacityRegistered.

    • #process-capacity
    • #warehouse-planning
  • #7Process capacity changed

    A registration moved a ProcessCapacity's effective rate.

    Message IDProcessCapacityChanged

    Raised by ProcessCapacity.AddConstraint when a registration (new or re-registered) changes the effective rate: the minimum rate value, the binding constraint, or both. A registration that leaves the effective rate untouched raises nothing. type = com.warehouse.wes.warehouse-planning.processcapacity.ProcessCapacityChanged.

    allOf

    CloudEvents 1.0 envelope of ProcessCapacityChanged.

    • #process-capacity
    • #warehouse-planning
  • #8Capacity plan created (analytics stream)

    The analytics copy of CapacityPlanCreated.

    Message IDCapacityPlanCreatedAnalytics

    Same type, same id, same payload as the integration CapacityPlanCreated; only dataschema differs (urn:warehouse:warehouse-planning:analytics:CapacityPlanCreated:v1). The projector uses the CloudEvents time as the plan's creation instant.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanCreated on the analytics topic.

    • #analytics
  • #9Capacity plan published (analytics stream)

    The analytics copy of CapacityPlanPublished, plus binding_constraint.

    Message IDCapacityPlanPublishedAnalytics

    Same type and id as the integration CapacityPlanPublished; the payload adds binding_constraint (additive, analytics-only): the constraint type binding the bottleneck step, which the bottleneck-frequency report groups by. The projector uses the CloudEvents time as the plan's publication instant.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanPublished on the analytics topic.

    • #analytics
  • #10Capacity shortage detected (analytics stream)

    The analytics copy of CapacityShortageDetected.

    Message IDCapacityShortageDetectedAnalytics

    Same type, id and payload as the integration CapacityShortageDetected; only dataschema differs.

    allOf

    CloudEvents 1.0 envelope of CapacityShortageDetected on the analytics topic.

    • #analytics
  • #11Bottleneck detected (analytics stream)

    The analytics copy of BottleneckDetected.

    Message IDBottleneckDetectedAnalytics

    Same type, id and payload as the integration BottleneckDetected; only dataschema differs.

    allOf

    CloudEvents 1.0 envelope of BottleneckDetected on the analytics topic.

    • #analytics
  • #12Capacity plan superseded (analytics stream)

    The analytics copy of CapacityPlanSuperseded.

    Message IDCapacityPlanSupersededAnalytics

    Same type, id and payload as the integration CapacityPlanSuperseded; only dataschema differs. The projector acknowledges it unprojected.

    allOf

    CloudEvents 1.0 envelope of CapacityPlanSuperseded on the analytics topic.

    • #analytics
  • #13Workload forecast received

    A receipt replaced the CPT buckets of a (site, path) workload forecast.

    Message IDWorkloadForecastReceived

    Raised by the WorkloadForecast aggregate on PUT /workload-forecasts/{site_id}/{path_id} when the receipt changed the buckets (a receipt equal to the stored one raises nothing), and queued in the transactional outbox in the same transaction as the forecast. It carries the totals, not the buckets. type = com.warehouse.wes.warehouse-planning.workloadforecast.WorkloadForecastReceived; subject and Kafka key = <site_id>/<path_id>. A superset of wes-work-planning's retired ChargeForecastReceived (ADR 0023 decision 1).

    allOf

    CloudEvents 1.0 envelope of WorkloadForecastReceived.

    • #workload-forecast
    • #warehouse-planning
  • #14Labour plan committed

    The heads a process path needs for one shift at one site were committed or revised.

    Message IDLabourPlanCommitted

    Raised by the LabourPlan aggregate on PUT /labour-plans/{site_id}/{shift_id}/{path_id} when the commit created or changed the plan (a PUT that changes nothing raises nothing and keeps the version), queued in the transactional outbox in the same transaction as the plan. Carries every field of the plan. planned_heads is the caller's (heads_source request) or derived from the stored workload forecast as ceil(units due in [shift_start, shift_start + hours) / (rate_units_per_hour x hours)) (heads_source forecast). shift_start is OMITTED (not null) when the plan has none. workforce-management keeps a copy (its ADR 0043) and applies a message only when its version is greater than the stored one. type = com.warehouse.wes.warehouse-planning.labourplan.LabourPlanCommitted; subject and Kafka key = <site_id>/<shift_id>/<path_id> (ADR 0023 decision 2).

    allOf

    CloudEvents 1.0 envelope of LabourPlanCommitted.

    • #labour-plan
    • #warehouse-planning
  • #15Labour plan drift detected

    The heads workforce-management committed for a (site, shift, path) differ from the labour plan.

    Message IDLabourPlanDriftDetected

    Raised when the committed heads (workforce-management's ShiftPlanCommitted) differ from the labour plan's planned_heads for the same (site_id, shift_id, path_id) and the drift is new: non-zero and different from the last drift recorded for that key. It never corrects either side. drift_heads = committed_heads - planned_heads (positive when workforce committed more heads than the plan requires). type = com.warehouse.wes.warehouse-planning.labourplan.LabourPlanDriftDetected; subject and Kafka key = <site_id>/<shift_id>/<path_id> (ADR 0023 decision 3).

    allOf

    CloudEvents 1.0 envelope of LabourPlanDriftDetected.

    • #labour-plan
    • #warehouse-planning
  • #16Workload forecast received (analytics stream)

    The analytics copy of WorkloadForecastReceived.

    Message IDWorkloadForecastReceivedAnalytics

    Same type, same id, same payload as the integration WorkloadForecastReceived; only dataschema differs (urn:warehouse:warehouse-planning:analytics:WorkloadForecastReceived:v1). The projector acknowledges it without projecting it.

    allOf

    CloudEvents 1.0 envelope of WorkloadForecastReceived on the analytics topic.

    • #analytics
  • #17Labour plan committed (analytics stream)

    The analytics copy of LabourPlanCommitted.

    Message IDLabourPlanCommittedAnalytics

    Same type, same id, same payload as the integration LabourPlanCommitted (with shift_start omitted when the plan has none); only dataschema differs (urn:warehouse:warehouse-planning:analytics:LabourPlanCommitted:v1). The projector acknowledges it without projecting it.

    allOf

    CloudEvents 1.0 envelope of LabourPlanCommitted on the analytics topic.

    • #analytics
  • #18Labour plan drift detected (analytics stream)

    The analytics copy of LabourPlanDriftDetected.

    Message IDLabourPlanDriftDetectedAnalytics

    Same type, same id, same payload as the integration LabourPlanDriftDetected; only dataschema differs (urn:warehouse:warehouse-planning:analytics:LabourPlanDriftDetected:v1). The projector acknowledges it without projecting it.

    allOf

    CloudEvents 1.0 envelope of LabourPlanDriftDetected on the analytics topic.

    • #analytics
  • #19Shift plan committed (consumed)

    workforce-management committed a headcount split for a path.

    Message IDShiftPlanCommitted

    CONSUMED from warehouse.workforce.events (producer: workforce-management; one message per PathPlan line). Becomes a LABOR CapacityConstraint on the ProcessCapacity of ProcessType = upper-case(path_id), location = site_code, or the deprecated building_id when site_code is absent (ADR 0021): rate = planned_heads * planned_rate (UNIT/HOUR), window = [time, time + planned_hours). Deduped on the CloudEvents id. A line with a shift_id then records its committed heads (planned_heads) for (site, shift_id, path_id) and, when a labour plan exists for that key and the drift is news, raises LabourPlanDriftDetected, in the same unit of work as the claim and the LABOR constraint (ADR 0023 decision 3). path_id is matched case-insensitively: the committed heads are keyed on its canonical form (trimmed, upper case), the form the labour plan is keyed on, so a line for pack meets the plan PUT as PACK. A line without shift_id records no committed heads.

    allOf

    CloudEvents 1.0 envelope of workforce-management's ShiftPlanCommitted (consumed).

    • #consumed
    • #warehouse-planning
  • #20Order allocated (consumed)

    order-management allocated every line of an order and released the eligible ones.

    Message IDOrderAllocated

    CONSUMED from warehouse.order-management.events (producer: order-management, its own apis/asyncapi.yaml). Upserts the order into the expected-demand read model: promise cutoff = data.promise_date, released lines = len(data.lines), site = data.site_id, or the configured DEMAND_SITE_ID when it is absent or blank (ADR 0021). subject must equal data.order_id. Deduped on the CloudEvents id; last writer wins per order on time. type = com.warehouse.wes.order-management.order.OrderAllocated.

    allOf

    CloudEvents 1.0 envelope of order-management's OrderAllocated (consumed).

    • #consumed
    • #warehouse-planning
  • #21Order partially allocated (consumed)

    Some lines of a partial-shipment order were allocated and released, some backordered.

    Message IDOrderPartiallyAllocated

    CONSUMED from warehouse.order-management.events. Same payload shape and the same effect as OrderAllocated (data.lines carries exactly the lines released in that pass); a later OrderAllocated for the same order replaces it. type = com.warehouse.wes.order-management.order.OrderPartiallyAllocated.

    allOf

    CloudEvents 1.0 envelope of order-management's OrderPartiallyAllocated (consumed).

    • #consumed
    • #warehouse-planning
  • #22Location slot registered (consumed)

    facility-layout registered a storage position or a work center.

    Message IDLocationSlotRegistered

    CONSUMED from warehouse.facility.events (producer: facility-layout). Tallied per (zoneId, locationType) as storage positions (role Storage), or per zone + activity as stations (role WorkCenter). A zone belongs to the site (planning location) named by its zone id's first dash-separated segment. Deduped on the CloudEvents id.

    allOf

    CloudEvents 1.0 envelope of facility-layout's LocationSlotRegistered (consumed).

    • #consumed
    • #warehouse-planning
  • #23Location slot decommissioned (consumed)

    facility-layout decommissioned a position.

    Message IDLocationSlotDecommissioned

    CONSUMED from warehouse.facility.events (producer: facility-layout). Decrements the tally the matching LocationSlotRegistered incremented; an untracked locationCode is logged and ignored.

    allOf

    CloudEvents 1.0 envelope of facility-layout's LocationSlotDecommissioned (consumed).

    • #consumed
    • #warehouse-planning
  • #24Dock appointment booked (consumed)

    dock-scheduling booked a door window for a carrier.

    Message IDDockAppointmentBooked

    CONSUMED from warehouse.dock-scheduling.events (producer: dock-scheduling; the data is the superset contract of the yard-management plan). Stores the appointment in the local inbound-demand read model (inbound_appointments, one row per data.appointment_id): site = data.site_id, direction, door window start/end and ASN count = len(data.asn_numbers). subject must equal data.appointment_id. Version-guarded: the window and status are written only when data.version is greater than the stored version; the direction and ASN count are filled in when the row lacks them. Deduped on the CloudEvents id. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked.

    allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentBooked (consumed).

    • #consumed
    • #warehouse-planning
  • #25Dock appointment rescheduled (consumed)

    dock-scheduling moved a booked appointment to another door window.

    Message IDDockAppointmentRescheduled

    CONSUMED from warehouse.dock-scheduling.events. Moves the appointment's demand to data.window_start / data.window_end (the previous window and the door are ignored) when data.version is greater than the stored version. Carries no direction and no ASNs: arriving before its Booked it is stored as a partial row that is not demand until the Booked supplies the direction. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled.

    allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentRescheduled (consumed).

    • #consumed
    • #warehouse-planning
  • #26Dock appointment cancelled (consumed)

    dock-scheduling cancelled a booked appointment.

    Message IDDockAppointmentCancelled

    CONSUMED from warehouse.dock-scheduling.events. Removes the appointment's demand: the row flips to CANCELLED and stops counting (terminal on the producer). A Cancelled that arrives BEFORE its Booked is stored as a tombstone (no window) that no Booked of an older version can resurrect. Idempotent: a redelivered id or a version that is not greater than the stored one is a no-op. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled.

    allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentCancelled (consumed).

    • #consumed
    • #warehouse-planning
  • #27Dock appointment no-show (consumed)

    dock-scheduling marked a booked appointment as not shown.

    Message IDDockAppointmentNoShow

    CONSUMED from warehouse.dock-scheduling.events. Removes the appointment's demand exactly like a Cancelled (the row flips to NO_SHOW; terminal on the producer: a late carrier needs a new booking). Carries the direction, so even a NoShow that arrives before its Booked is stored with a known direction. type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow.

    allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentNoShow (consumed).

    • #consumed
    • #warehouse-planning
  • #28Task completed (consumed)

    fulfillment-execution reports that a station completed a task.

    Message IDTaskCompleted

    CONSUMED from warehouse.fulfillment.events (producer: fulfillment-execution, its own apis/asyncapi.yaml). Adds the completion to the local observed_capacity read model: one row per (location, process_type = upper-cased data.task_type, minute of the CloudEvents time) with the task count and the duration total. Site = the configured DEMAND_SITE_ID. The idempotency claim on the CloudEvents id and the additive upsert commit in ONE transaction, so a redelivered id adds nothing. A completion without task_type or task_id is dead-lettered. Only the fields below are read; the enrichment fields fulfillment-execution adds (work_unit_id, associate_id, relocation fields) are ignored. type = com.warehouse.wes.fulfillment-execution.task.TaskCompleted.

    allOf

    CloudEvents 1.0 envelope of fulfillment-execution's TaskCompleted (consumed).

    • #consumed
    • #warehouse-planning
  • #29Labour standard defined (consumed)

    labor-performance defined an engineered labour standard for a task type.

    Message IDLaborStandardDefined

    CONSUMED from warehouse.labor-performance.events (producer: labor-performance, its own apis/asyncapi.yaml, ADR 0038: the same payload as its analytics copy). Recorded in the local labor_standards copy under standard_id; as_of = the CloudEvents time. site_code absent = every site. A standard with a handling_unit is stored but not used to price a plan (plan demand has no handling-unit split). type = com.warehouse.wes.labor-performance.standard.LaborStandardDefined.

    allOf

    CloudEvents 1.0 envelope of labor-performance's LaborStandardDefined (consumed).

    • #consumed
    • #warehouse-planning
  • #30Labour standard revised (consumed)

    labor-performance revised a labour standard (a new record under a new standard_id).

    Message IDLaborStandardRevised

    CONSUMED from warehouse.labor-performance.events. A revision closes the prior record in labor-performance and opens a new one, so it is recorded like a definition: a new row, and the latest effective_from before a plan's window start is the standard in force. previous_expected_seconds and the team-lift fields are ignored. type = com.warehouse.wes.labor-performance.standard.LaborStandardRevised.

    allOf

    CloudEvents 1.0 envelope of labor-performance's LaborStandardRevised (consumed).

    • #consumed
    • #warehouse-planning
  • #31Process flow defined (consumed)

    process-path-management defined a process flow (version 1).

    Message IDProcessFlowDefined

    CONSUMED from warehouse.process-path-management.events (producer: process-path-management, its own apis/asyncapi.yaml, ADR 0042). The FULL state of the flow at its version; applied to the local process_flows copy only when version is greater than the stored one (a first message for an unknown flow is stored). type = com.warehouse.wes.process-path-management.processflow.ProcessFlowDefined, subject and Kafka key = flow_id.

    allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowDefined (consumed).

    • #consumed
    • #warehouse-planning
  • #32Process flow revised (consumed)

    process-path-management revised a process flow, or republished it at its start.

    Message IDProcessFlowRevised

    CONSUMED from warehouse.process-path-management.events. The FULL new state at the next version; also the producer's startup republish of every ACTIVE flow at its CURRENT version, which a caught-up copy ignores (equal version) and a fresh one learns. type = com.warehouse.wes.process-path-management.processflow.ProcessFlowRevised.

    allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowRevised (consumed).

    • #consumed
    • #warehouse-planning
  • #33Process flow retired (consumed)

    process-path-management retired a process flow.

    Message IDProcessFlowRetired

    CONSUMED from warehouse.process-path-management.events. The FULL state with status RETIRED at the next version. A RETIRED flow does not resolve a path id: the locally declared path of that id, if any, is used. type = com.warehouse.wes.process-path-management.processflow.ProcessFlowRetired.

    allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowRetired (consumed).

    • #consumed
    • #warehouse-planning

Schemas

  • object

    CloudEvents 1.0 structured-mode envelope. Every attribute below is required; the context's own payload sits under data.

  • object

    Payload of CapacityPlanCreated.

  • allOf

    CloudEvents 1.0 envelope of ProcessCapacityRegistered.

  • object

    Payload of ProcessCapacityRegistered -- the native constraint that created the aggregate.

  • allOf

    CloudEvents 1.0 envelope of ProcessCapacityChanged.

  • object

    Payload of ProcessCapacityChanged -- the effective rate before and after the causing registration.

  • object

    Payload of CapacityPlanPublished. site_id is ADDITIVE on the v1 payload — present for plans created after migration 0008, omitted for older plans — and a consumer must treat its absence as unknown (never derive it from warehouse_id or location).

  • object

    Payload of CapacityShortageDetected. shortage is always > 0 here.

  • object

    Payload of BottleneckDetected.

  • object

    Payload of CapacityPlanSuperseded (ADR 0024 decision 3); the identity of the OLDER plan.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanSuperseded.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanSuperseded on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanCreated.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanPublished.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanCreated on the analytics topic.

  • allOf

    Payload of CapacityPlanPublished on the analytics topic -- the integration payload plus binding_constraint.

  • allOf

    CloudEvents 1.0 envelope of CapacityPlanPublished on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of CapacityShortageDetected on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of BottleneckDetected on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of CapacityShortageDetected.

  • allOf

    CloudEvents 1.0 envelope of BottleneckDetected.

  • object

    Payload of WorkloadForecastReceived (the same on the integration and the analytics topic).

  • object

    Payload of LabourPlanCommitted (the same on the integration and the analytics topic): every field of the labour plan. shift_start is optional and OMITTED (never null) when the plan has none.

  • object

    Payload of LabourPlanDriftDetected (the same on the integration and the analytics topic).

  • allOf

    CloudEvents 1.0 envelope of WorkloadForecastReceived.

  • allOf

    CloudEvents 1.0 envelope of LabourPlanCommitted.

  • allOf

    CloudEvents 1.0 envelope of LabourPlanDriftDetected.

  • allOf

    CloudEvents 1.0 envelope of WorkloadForecastReceived on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of LabourPlanCommitted on the analytics topic.

  • allOf

    CloudEvents 1.0 envelope of LabourPlanDriftDetected on the analytics topic.

  • object

    Fields this service reads from one fanned-out ShiftPlanCommitted message (one per PathPlan line). A message with no site (blank site_code and building_id) or a blank path_id is skipped (WARN). The LABOR constraint is planned_heads x planned_rate UNIT per HOUR at location site_code (or building_id when site_code is absent, ADR 0021) for the window [CloudEvents time, time + planned_hours); heads, rate and hours are not range-checked here (a value the domain rejects is skipped). A line with a shift_id also records its committed heads for the labour plan drift (ADR 0023 decision 3), keyed on (site, shift_id, path_id in upper case).

  • object

    Fields this service reads from LocationSlotRegistered. A message with a blank locationCode or zoneId, an unrecognized role, a Storage slot with a blank locationType or a WorkCenter slot with no activities is skipped (WARN); an already-tallied locationCode is a no-op.

  • object

    Fields this service reads from LocationSlotDecommissioned.

  • allOf

    CloudEvents 1.0 envelope of workforce-management's ShiftPlanCommitted (consumed).

  • allOf

    CloudEvents 1.0 envelope of facility-layout's LocationSlotRegistered (consumed).

  • allOf

    CloudEvents 1.0 envelope of facility-layout's LocationSlotDecommissioned (consumed).

  • object

    Fields this service reads from order-management's OrderAllocated / OrderPartiallyAllocated data (its own AllocationData; hand-mirrored, never imported). Everything else in the payload is ignored.

  • allOf

    CloudEvents 1.0 envelope of order-management's OrderAllocated (consumed).

  • allOf

    CloudEvents 1.0 envelope of order-management's OrderPartiallyAllocated (consumed).

  • object

    Fields this service reads from dock-scheduling's DockAppointmentBooked data (hand-mirrored, never imported). door_code, carrier, carrier_scac, cpt_id, shipment_refs, expected_seal_number and provenance are ignored.

  • allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentBooked (consumed).

  • object

    Fields this service reads from dock-scheduling's DockAppointmentRescheduled data. door_code, previous_window_start and previous_window_end are ignored.

  • allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentRescheduled (consumed).

  • object

    Fields this service reads from dock-scheduling's DockAppointmentCancelled data. door_code and reason are ignored.

  • allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentCancelled (consumed).

  • object

    Fields this service reads from dock-scheduling's DockAppointmentNoShow data. door_code, carrier_scac and window_end are ignored.

  • allOf

    CloudEvents 1.0 envelope of dock-scheduling's DockAppointmentNoShow (consumed).

  • object

    Fields this service reads from fulfillment-execution's TaskCompleted data (hand-mirrored, never imported). Everything else is ignored.

  • allOf

    CloudEvents 1.0 envelope of fulfillment-execution's TaskCompleted (consumed).

  • object

    Fields this service reads from labor-performance's LaborStandardDefined / LaborStandardRevised data (hand-mirrored, never imported; docs/adr/0022 decision 2). Everything else (previous_expected_seconds, team_lift_threshold_g, team_lift_expected_seconds) is ignored.

  • allOf

    CloudEvents 1.0 envelope of labor-performance's LaborStandardDefined (consumed).

  • allOf

    CloudEvents 1.0 envelope of labor-performance's LaborStandardRevised (consumed).

  • object

    The FULL state of one process flow at one version, as this service reads it from process-path-management's ProcessFlowDefined / ProcessFlowRevised / ProcessFlowRetired data (hand-mirrored, never imported; docs/adr/0025 decision 1). Applied only when version is greater than the stored one.

  • allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowDefined (consumed).

  • allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowRevised (consumed).

  • allOf

    CloudEvents 1.0 envelope of process-path-management's ProcessFlowRetired (consumed).