exception-management Domain Events 1.0.0

Event catalog for the exception-management bounded context (WES subdomain): the Problem Solve lifecycle (ADR 0001, ADR 0002). Every case is opened by a fact another context published; this service owns the triage, assignment, SLA and resolution of that case, never the producer's own state.

Published. The ExceptionCase aggregate raises six events and the ExceptionPolicy aggregate one, all published to warehouse.exception-management.events through a transactional outbox: the aggregate row 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 stored with the outbox row, so a retry republishes the same id). Kafka key = case id (source type for the policy event), so one case's history stays ordered on one partition.

Consumed (ADR 0003, 0006, 0010, 0011, 0012). Exception facts from ten sibling contexts: fulfillment-execution (TaskCPTMissed, PackageDiverted, WeightDiscrepancyDetected), wes-work-planning (BacklogThresholdBreached), network-fulfillment (AcknowledgementDeadlineAtRisk, OrphanedHoldCancelled), order-management (OrderRepromised, correlation for auto-resolve only), returns-processing (UnexpectedReturnReceived), inbound-receiving (CartonDiscrepancyRaised, routed by kind, ADR 0006), inventory-storage (DiscrepancyDetected, ItemUnlocated, and — under a second consumer group, ADR 0012 — StockHeld, StockReleased, StockDispositioned: one case per held unit, auto-resolved when the hold ends), yard-management (VisitRejected, SealExceptionRaised, TrailerDwellExceeded, YardCheckClosed — one case per discrepancy, ADR 0010), dock-scheduling (DockAppointmentNoShow, ADR 0010) and outbound-shipping (PackageMissedLoad, ADR 0011). Each consumed message opens or touches exactly one open case per dedup key (source type, source subject, site); the source payload is frozen on the case, never re-fetched. The consumed messages below are the producers' own contracts, restated here and never imported.

Envelope (mandatory). CloudEvents 1.0, structured content mode, Kafka header content-type: application/cloudevents+json; charset=UTF-8. specversion, id, source (/warehouse/exception-management), type, subject (the case id; the source type for the policy event), time, datacontenttype (application/json) and dataschema (urn:warehouse:exception-management:events:<EventName>:v1) are all required. Kafka key = the subject. Type = com.warehouse.wes.exception-management.<entity>.<EventName>. A breaking payload change is a new .v2 type, never a mutation.

  • #exception-management
  • #exceptioncase
  • #exceptionpolicy
  • #analytics
  • #consumed

Servers

  • {brokers}kafkaproduction

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

    object
    string
    required
    Security:
    security.protocol:PLAINTEXT

Operations

  • SUB warehouse.exception-management.events

    This service's integration topic. Written by the outbox relay; key = case id (source type for the policy event); the only Kafka header on every message is the CloudEvents content-type (the relay sets no traceparent). Rows the relay can never encode are parked raw on warehouse.exception-management.events.dlq. Dispatch on the full type, ignore unknown types, dedupe on id.

    Receive ExceptionCase and ExceptionPolicy events.

    Subscribe to the case lifecycle. Route on the full type (com.warehouse.wes.exception-management.exceptioncase.<EventName>). ExceptionOpened announces a case (with its frozen source payload); ExceptionTriaged, ExceptionAssigned and ExceptionEscalated are operator/sweeper facts; ExceptionResolved and ExceptionAutoResolved are terminal. ExceptionPolicyDeclared (key and subject = the source type) announces a policy version.

    Operation IDreceiveExceptionEvents

    Available only on servers:

    • #exceptioncase

    Accepts one of the following messages:

    • #0Exception opened

      A source fact created a case (first occurrence of the dedup key).

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionOpened; subject and key = the case id. sla_due_at is opened_at plus the policy's sla_minutes for the source type. source_payload is the frozen copy of the producer's data exactly as consumed: it never changes after open and is never re-fetched. site_id is null when the source event carries no site.

      allOf
      • #exceptioncase

      Examples

    • #1Exception triaged

      Severity and queue were set (policy default or operator).

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionTriaged; subject and key = the case id. actor is the operator id or system.

      allOf
      • #exceptioncase

      Examples

    • #2Exception assigned

      An owner took the case.

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionAssigned; subject and key = the case id. assignee is the operator id now owning the case; actor is who performed the assignment.

      allOf
      • #exceptioncase

      Examples

    • #3Exception escalated

      The SLA clock breached; the ESCALATED flag was set (work continues).

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionEscalated; subject and key = the case id. Raised once by the bounded SLA sweeper when now passes sla_due_at while the case is not resolved. The flag never blocks a transition and is not a state (ADR 0002).

      allOf
      • #exceptioncase

      Examples

    • #4Exception resolved

      A resolution code and root cause were recorded; the case is terminal.

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionResolved; subject and key = the case id. resolution_code and root_cause are mandatory; note is a free-form nullable remark. actor is the operator id. After this the case accepts no command (409-class error).

      allOf
      • #exceptioncase

      Examples

    • #5Exception auto-resolved

      A declarative policy rule closed the case on a correlated fact.

      type = com.warehouse.wes.exception-management.exceptioncase.ExceptionAutoResolved; subject and key = the case id. rule_id names the policy's auto-resolve rule that fired; it is derived, <governed source type>-><correlated type>; correlated_type and correlated_event_id are the full CloudEvents type and id of the correlated fact that satisfied the rule (for example an OrderRepromised for the same work unit within the window). note (ADR 0012) is the closing fact's outcome when it carries one (a held-stock disposition or release); null when it does not.

      allOf
      • #exceptioncase

      Examples

    • #6Exception policy declared

      A new version of the handling policy of a source type.

      type = com.warehouse.wes.exception-management.exceptionpolicy.ExceptionPolicyDeclared; subject and key = the source type (the full CloudEvents type string of the consumed source event the policy governs). Policies are append-only versions; the new version governs cases opened afterwards. auto_resolve is null when the source type has no auto-resolve rule.

      allOf
      • #exceptionpolicy

      Examples

  • SUB warehouse.exception-management.analytics

    This service's own analytics stream (ADR 0013), written by the SAME transactional outbox relay as the integration topic: every published fact appears here too, under the SAME CloudEvents id and type, with only the dataschema stream segment different (urn:warehouse:exception-management:analytics::v1). It is NOT an integration contract: the only consumer is this service's cmd/exceptions-projector (fixed group from ANALYTICS_CONSUMER_GROUP, starting at the earliest retained offset), which folds the events into the analytical database; its deterministic poison goes to warehouse.exception-management.analytics.dlq. Other contexts keep reading warehouse.exception-management.events.

    Receive the analytics twin of every published fact.

    Payloads are byte-for-byte the integration payloads (ADR 0013); only the dataschema names the analytics stream. The projector answers the root-cause-frequency, mean-time-to-resolve, sla-breach-rate and freshness reports from the folded facts.

    Operation IDreceiveExceptionAnalytics

    Available only on servers:

    • #analytics

    Accepts one of the following messages:

    • #0Exception opened (analytics twin)

      The analytics-stream twin of ExceptionOpened (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionOpened:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #1Exception triaged (analytics twin)

      The analytics-stream twin of ExceptionTriaged (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionTriaged:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #2Exception assigned (analytics twin)

      The analytics-stream twin of ExceptionAssigned (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionAssigned:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #3Exception escalated (analytics twin)

      The analytics-stream twin of ExceptionEscalated (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionEscalated:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #4Exception resolved (analytics twin)

      The analytics-stream twin of ExceptionResolved (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionResolved:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #5Exception auto-resolved (analytics twin)

      The analytics-stream twin of ExceptionAutoResolved (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionAutoResolved:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

    • #6Exception policy declared (analytics twin)

      The analytics-stream twin of ExceptionPolicyDeclared (ADR 0013).

      Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionPolicyDeclared:v1. Consumed only by cmd/exceptions-projector.

      allOf
      • #analytics

      Examples

  • PUB warehouse.fulfillment.events

    fulfillment-execution's integration topic. This service consumes TaskCPTMissed, PackageDiverted and WeightDiscrepancyDetected under a stable consumer group read from env FULFILLMENT_EXCEPTIONS_CONSUMER_GROUP. Every other type on the topic is ignored. PackageDiverted and WeightDiscrepancyDetected arrive here only after the producer's promotion PR (they are analytics-only today); the contract below is pinned consumer-first.

    Consume fulfillment-execution exception facts.

    TaskCPTMissed is re-fired on every sweep tick by design: a repeat does not open a second case, it touches the open one (occurrence + 1, lastSeenAt). order_ref is WES's per-line work unit id {order_id}-line-{line_no} (order-management ADR 0018); an OrderRepromised for that order line closes the case through the policy's auto-resolve rule. The CloudEvents id claim and the effect commit in one transaction; the offset is committed afterwards (ADR 0003).

    Operation IDconsumeFulfillmentEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0TaskCPTMissed (consumed, fulfillment-execution)

      A task is still open past its CPT deadline.

      type = com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed, source /warehouse/fulfillment-execution, dataschema urn:warehouse:fulfillment-execution:events:TaskCPTMissed:v1. Subject and Kafka key = the task id. Re-fired on every sweep pass while the task stays open: every repeat after the first touches the open case (occurrence + 1, lastSeenAt), never opens a second one. order_ref is WES's work unit id {order_id}-line-{line_no}; task_type is omitted when unknown.

      allOf
      • #consumed

      Examples

    • #1PackageDiverted (consumed, fulfillment-execution)

      A package was diverted off the standard path.

      PENDING PRODUCER PROMOTION P1: fulfillment-execution publishes this type on its analytics topic only today; it arrives on warehouse.fulfillment.events (dataschema urn:warehouse:fulfillment-execution:events:PackageDiverted:v1) once the producer's promotion PR merges. type = com.warehouse.wes.fulfillment-execution.package.PackageDiverted, source /warehouse/fulfillment-execution. Subject and Kafka key = the package id.

      allOf
      • #consumed

      Examples

    • #2WeightDiscrepancyDetected (consumed, fulfillment-execution)

      SLAM found the package weight out of tolerance.

      PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.fulfillment.events (dataschema urn:warehouse:fulfillment-execution:events:WeightDiscrepancyDetected:v1) once the producer's promotion PR merges. type = com.warehouse.wes.fulfillment-execution.package.WeightDiscrepancyDetected, source /warehouse/fulfillment-execution. Subject and Kafka key = the package id.

      allOf
      • #consumed

      Examples

  • PUB warehouse.work-planning.events

    wes-work-planning's integration topic. This service consumes ONLY BacklogThresholdBreached under a stable consumer group read from env WORK_PLANNING_EXCEPTIONS_CONSUMER_GROUP. Every other type is ignored.

    Consume the backlog alarm of a process path.

    The published data carries only path_id (the producer's contract); the case is one per path while the alarm keeps re-firing on every observation sweep. Repeats touch the open case, they never open a second one. The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeWorkPlanningEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    BacklogThresholdBreached (consumed, wes-work-planning)

    A path's backlog depth crossed its alarm threshold.

    type = com.warehouse.wes.work-planning.workpool.BacklogThresholdBreached, source /warehouse/wes-work-planning, dataschema urn:warehouse:wes-work-planning:events:BacklogThresholdBreached:v1. Subject and Kafka key = the path id. The published data carries ONLY path_id (the producer's contract); consumers wanting the depth and rate numbers read the producer's telemetry projection instead. The signal re-fires on every observation sweep: repeats touch the open case, never open a second one.

    allOf
    • #consumed

    Examples

  • PUB warehouse.network-fulfillment.events

    network-fulfillment's integration topic. This service consumes AcknowledgementDeadlineAtRisk and OrphanedHoldCancelled under a stable consumer group read from env NETWORK_FULFILLMENT_EXCEPTIONS_CONSUMER_GROUP. Every other type is ignored.

    Consume network-order acknowledgement risk and orphaned holds.

    Both events re-fire on every sweep pass for as long as the condition holds: a repeat touches the open case (occurrence + 1, lastSeenAt), never opens a second one. The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeNetworkFulfillmentEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0AcknowledgementDeadlineAtRisk (consumed, network-fulfillment)

      A network order's acknowledgement window closed with no answer.

      type = com.warehouse.wes.network-fulfillment.networkorder.AcknowledgementDeadlineAtRisk, source /warehouse/network-fulfillment, dataschema urn:warehouse:network-fulfillment:events:AcknowledgementDeadlineAtRisk:v1. Subject and Kafka key = the network order reference (networkRef). A reported fact that re-fires on every sweep pass while the order is still NEW past acknowledgeBy: repeats touch the open case, never open a second one.

      allOf
      • #consumed

      Examples

    • #1OrphanedHoldCancelled (consumed, network-fulfillment)

      A hold order-management made for demand nobody decided was cancelled.

      type = com.warehouse.wes.network-fulfillment.networkorder.OrphanedHoldCancelled, source /warehouse/network-fulfillment, dataschema urn:warehouse:network-fulfillment:events:OrphanedHoldCancelled:v1. Subject and Kafka key = the network order reference (networkRef). answer is what order-management said to the cancel (CANCELLED or NOT_FOUND); localOrderId is the held order-management order.

      allOf
      • #consumed

      Examples

  • PUB warehouse.order-management.events

    order-management's integration topic. This service consumes ONLY OrderRepromised under a stable consumer group read from env ORDER_CORRELATION_CONSUMER_GROUP, and never as a case source: it is the correlated fact that auto-resolves an open TaskCPTMissed case for the same work unit (ADR 0002 auto-resolve rule). Every other type is ignored.

    Consume re-promises as the correlated fact of the auto-resolve rule.

    OrderRepromised opens no case. The rule reverses the work-unit formula ({order_id}-line-{line_no}) of the open case's source order_ref and compares it with the repromised order_id; a match within the rule's window auto-resolves the case, a mismatch is a no-op (the case stays open — fails soft). The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeOrderCorrelationEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    OrderRepromised (consumed, order-management)

    A missed CPT pushed the order's promise to a later cutoff.

    type = com.warehouse.wes.order-management.order.OrderRepromised, source /warehouse/order-management, dataschema urn:warehouse:order-management:events:OrderRepromised:v1. Subject and Kafka key = the order id. Never a case source: it is the correlated fact of the auto-resolve rule. The rule reverses the work-unit formula of the open case's source order_ref and compares it with order_id; no match is a no-op (the case stays open).

    allOf
    • #consumed

    Examples

  • PUB warehouse.returns-processing.events

    returns-processing's integration topic. This service consumes ONLY UnexpectedReturnReceived under a stable consumer group read from env RETURNS_EXCEPTIONS_CONSUMER_GROUP (the producer ships in wave 3; the contract below is pinned consumer-first). Every other type is ignored.

    Consume unexpected returns as problem-solve facts.

    A return that arrived with no authorization opens one case per (receipt id, site): the dedup subject is receipt_id alone, so further lines of the same receipt touch the open case (line_no stays in the frozen payload only). The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeReturnsEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    UnexpectedReturnReceived (consumed, returns-processing)

    A return line arrived with no authorization.

    PENDING PRODUCER (wave 3): returns-processing ships this type on warehouse.returns-processing.events; the contract is pinned here consumer-first from the fleet plan. type = com.warehouse.wms.returns-processing.returnreceipt.UnexpectedReturnReceived, source /warehouse/returns-processing, dataschema urn:warehouse:returns-processing:events:UnexpectedReturnReceived:v1. Subject and Kafka key = the receipt id. One case per receipt line; repeats touch the open case.

    allOf
    • #consumed

    Examples

  • PUB warehouse.inbound-receiving.events

    inbound-receiving's integration topic. This service consumes ONLY CartonDiscrepancyRaised under a stable consumer group read from env CARTON_DISCREPANCY_CONSUMER_GROUP (ADR 0006). Every other type is ignored.

    Consume carton discrepancies as routed cases.

    One case per (receipt_id, sscc or "-", kind); the dedup subject is <receipt_id>/<sscc or ->/<kind>. The kinds MissingCarton, DuplicateSscc, UnexpectedCarton, CaseQtyMismatch, MixedCaseDeclaredAsCasePack, MixedCartonContentMismatch, UnknownGtin and any unknown kind route to the problem-solve policy; UnlabelledCarton and CartonOverLimit to the receiving-lead policy (informational). The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeInboundReceivingEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    CartonDiscrepancyRaised (consumed, inbound-receiving)

    A carton did not match its ASN or failed a receiving check.

    type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised, source /warehouse/inbound-receiving, subject and Kafka key = the receipt id. kind is an open string (UnexpectedCarton, MissingCarton, DuplicateSscc, UnknownGtin, CaseQtyMismatch, MixedCaseDeclaredAsCasePack, UnlabelledCarton, CartonOverLimit, MixedCartonContentMismatch, ...).

    allOf
    • #consumed

    Examples

  • PUB warehouse.yard-management.events

    yard-management's integration topic (ADR 0010). This service consumes ONLY VisitRejected, SealExceptionRaised, TrailerDwellExceeded and YardCheckClosed under a stable consumer group read from env YARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUP. Every other type (the producer's analytics-heavy surface) is ignored. The contracts below are pinned consumer-first from the producer's published contract.

    Consume yard exceptions as routed cases.

    One case per visit (VisitRejected), per trailer raise (SealExceptionRaised, TrailerDwellExceeded) and per discrepancy (YardCheckClosed). Each source type is its own policy (default queue yard-supervisor, migration 0004). The CloudEvents id claim and the effect commit in one transaction; a yard check claims its id once for all of its cases.

    Operation IDconsumeYardManagementEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0VisitRejected (consumed, yard-management)

      A yard visit was refused at the gate.

      type = com.warehouse.wms.yard-management.yardvisit.VisitRejected, source /warehouse/yard-management, subject and Kafka key = the visit id. Dedup subject = visit_id; the site is site_id. ADR 0010.

      allOf
      • #consumed

      Examples

    • #1SealExceptionRaised (consumed, yard-management)

      A trailer seal differs from the one the carrier declared.

      type = com.warehouse.wms.yard-management.trailer.SealExceptionRaised, source /warehouse/yard-management, subject and Kafka key = the trailer id. Dedup subject = <trailer_id>/<raised_at> (a later visit of the same trailer is its own case; the same raise re-published touches). ADR 0010.

      allOf
      • #consumed

      Examples

    • #2TrailerDwellExceeded (consumed, yard-management)

      A trailer stayed on site past its dwell threshold.

      type = com.warehouse.wms.yard-management.trailer.TrailerDwellExceeded, source /warehouse/yard-management, subject and Kafka key = the trailer id. The payload carries no instant: the dedup subject is <trailer_id>/<CloudEvents time> (the producer raises once per trailer and threshold crossing). ADR 0010.

      allOf
      • #consumed

      Examples

    • #3YardCheckClosed (consumed, yard-management)

      A yard audit closed; each discrepancy becomes its own case.

      type = com.warehouse.wms.yard-management.yardcheck.YardCheckClosed, source /warehouse/yard-management, subject and Kafka key = the yard check id. ONE case per entry of discrepancies, keyed <yard_check_id>/<kind>/<location_code>/<trailer_id, else unit_number, else ->; the CloudEvents id is claimed once for the whole check. A check without discrepancies opens nothing. ADR 0010.

      allOf
      • #consumed

      Examples

  • PUB warehouse.dock-scheduling.events

    dock-scheduling's integration topic (ADR 0010). This service consumes ONLY DockAppointmentNoShow under a stable consumer group read from env DOCK_SCHEDULING_EXCEPTIONS_CONSUMER_GROUP. Every other type on the topic (bookings, reschedules, cancellations, door closures) is ignored.

    Consume appointment no-shows as dock-planner cases.

    One case per appointment id; the policy is the source type's own (default queue dock-planner, migration 0004). The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeDockSchedulingEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    DockAppointmentNoShow (consumed, dock-scheduling)

    A carrier missed its dock appointment window.

    type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow, source /warehouse/dock-scheduling, subject and Kafka key = the appointment id. Dedup subject = appointment_id; NO_SHOW is terminal in dock-scheduling, so one case per appointment. ADR 0010.

    allOf
    • #consumed

    Examples

  • PUB warehouse.inventory.events

    inventory-storage's integration topic. This service reads it under TWO stable consumer groups. INVENTORY_EXCEPTIONS_CONSUMER_GROUP consumes DiscrepancyDetected and ItemUnlocated (both arrive here only after the producer's promotion PR; the contracts below are pinned consumer-first). HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012) consumes the held-stock facts StockHeld, StockReleased and StockDispositioned: every held unit gets exactly one open case, auto-resolved when the hold ends. Every other type on the topic is ignored by both groups.

    Consume count discrepancies, unlocated stock and held-stock facts.

    A short count (DiscrepancyDetected) and the stock it could not find (ItemUnlocated) each open or touch their own case. A StockHeld fact opens ONE case per held unit id (a re-emitted hold touches it); a closing disposition (RELEASE, RETURN_TO_VENDOR, SCRAP) or a release auto-resolves it with the outcome in the resolution note, while a REWORK disposition keeps the unit held and the case open (the arrival is recorded as an occurrence). The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeInventoryEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0DiscrepancyDetected (consumed, inventory-storage)

      A cycle count found the bin did not match system records.

      PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.inventory.events (dataschema urn:warehouse:inventory-storage:events:DiscrepancyDetected:v1) once the producer's promotion PR merges. type = com.warehouse.wms.inventory-storage.bin.DiscrepancyDetected, source /warehouse/inventory-storage. Subject and Kafka key = the bin id.

      allOf
      • #consumed

      Examples

    • #1ItemUnlocated (consumed, inventory-storage)

      A physical item's bin is no longer known; the stock is lost.

      PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.inventory.events (dataschema urn:warehouse:inventory-storage:events:ItemUnlocated:v1) once the producer's promotion PR merges. type = com.warehouse.wms.inventory-storage.stock.ItemUnlocated, source /warehouse/inventory-storage. Subject = the stock unit id, Kafka key = the SKU.

      allOf
      • #consumed

      Examples

    • #2StockHeld (consumed, inventory-storage)

      A unit of stock was booked HELD; no usable quantity until dispositioned.

      Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012; the producer's own contract is inventory-storage ADR 0052). type = com.warehouse.wms.inventory-storage.stock.StockHeld, source /warehouse/inventory-storage, dataschema urn:warehouse:inventory-storage:events:StockHeld:v1. Subject = Kafka key = the held unit id. ONE case opens per held unit id: the payload (sku, quantity, hold reason, receipt/ASN/line source) is frozen on it; a re-emitted hold touches the same case.

      allOf
      • #consumed

      Examples

    • #3StockReleased (consumed, inventory-storage)

      A held unit was released; the quantity re-enters stock as a fresh staged receipt.

      Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012). The producer raises it ONLY on a RELEASE disposition, in addition to StockDispositioned (inventory-storage ADR 0052), so in practice it arrives as the second fact of a pair whose first fact already closed the case; handling it as a close in its own right covers either arrival order. It auto-resolves the held unit's case with a released note. type = com.warehouse.wms.inventory-storage.stock.StockReleased, subject = Kafka key = the held unit id.

      allOf
      • #consumed

      Examples

    • #4StockDispositioned (consumed, inventory-storage)

      A disposition was decided for a held unit.

      Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012). Raised for all four dispositions (inventory-storage ADR 0052): RELEASE, RETURN_TO_VENDOR and SCRAP end the hold, so the case auto-resolves with the disposition in the resolution note; REWORK KEEPS the unit held, so the case stays open and the arrival is recorded as an occurrence. type = com.warehouse.wms.inventory-storage.stock.StockDispositioned, subject = Kafka key = the held unit id.

      allOf
      • #consumed

      Examples

  • PUB warehouse.outbound-shipping.events

    outbound-shipping's integration topic. This service consumes ONLY PackageMissedLoad under a stable consumer group read from env OUTBOUND_SHIPPING_EXCEPTIONS_CONSUMER_GROUP (ADR 0011). Every other type is ignored.

    Consume packages that missed their load.

    One problem-solve case per missed package: the dedup subject is the package_id (the producer raises the fact at most once per package and load), the site part of the key is the payload site_id. The package, load, order, cutoff and detection instant the operator needs are frozen on the case exactly as the producer shipped them. The CloudEvents id claim and the effect commit in one transaction.

    Operation IDconsumeOutboundShippingEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    PackageMissedLoad (consumed, outbound-shipping)

    A package was not loaded by its cutoff or by departure.

    type = com.warehouse.wms.outbound-shipping.shippingpackage.PackageMissedLoad, source /warehouse/outbound-shipping, dataschema urn:warehouse:outbound-shipping:events:PackageMissedLoad:v1. Subject and Kafka key = the package id. The producer raises it at most once per package and load; source_order_id is omitted when the manifest carried none. One problem-solve case per missed package (ADR 0011).

    allOf
    • #consumed

    Examples

Messages

  • #1Exception opened

    A source fact created a case (first occurrence of the dedup key).

    Message IDExceptionOpened

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionOpened; subject and key = the case id. sla_due_at is opened_at plus the policy's sla_minutes for the source type. source_payload is the frozen copy of the producer's data exactly as consumed: it never changes after open and is never re-fetched. site_id is null when the source event carries no site.

    allOf
    • #exceptioncase
  • #2Exception triaged

    Severity and queue were set (policy default or operator).

    Message IDExceptionTriaged

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionTriaged; subject and key = the case id. actor is the operator id or system.

    allOf
    • #exceptioncase
  • #3Exception assigned

    An owner took the case.

    Message IDExceptionAssigned

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionAssigned; subject and key = the case id. assignee is the operator id now owning the case; actor is who performed the assignment.

    allOf
    • #exceptioncase
  • #4Exception escalated

    The SLA clock breached; the ESCALATED flag was set (work continues).

    Message IDExceptionEscalated

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionEscalated; subject and key = the case id. Raised once by the bounded SLA sweeper when now passes sla_due_at while the case is not resolved. The flag never blocks a transition and is not a state (ADR 0002).

    allOf
    • #exceptioncase
  • #5Exception resolved

    A resolution code and root cause were recorded; the case is terminal.

    Message IDExceptionResolved

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionResolved; subject and key = the case id. resolution_code and root_cause are mandatory; note is a free-form nullable remark. actor is the operator id. After this the case accepts no command (409-class error).

    allOf
    • #exceptioncase
  • #6Exception auto-resolved

    A declarative policy rule closed the case on a correlated fact.

    Message IDExceptionAutoResolved

    type = com.warehouse.wes.exception-management.exceptioncase.ExceptionAutoResolved; subject and key = the case id. rule_id names the policy's auto-resolve rule that fired; it is derived, <governed source type>-><correlated type>; correlated_type and correlated_event_id are the full CloudEvents type and id of the correlated fact that satisfied the rule (for example an OrderRepromised for the same work unit within the window). note (ADR 0012) is the closing fact's outcome when it carries one (a held-stock disposition or release); null when it does not.

    allOf
    • #exceptioncase
  • #7Exception policy declared

    A new version of the handling policy of a source type.

    Message IDExceptionPolicyDeclared

    type = com.warehouse.wes.exception-management.exceptionpolicy.ExceptionPolicyDeclared; subject and key = the source type (the full CloudEvents type string of the consumed source event the policy governs). Policies are append-only versions; the new version governs cases opened afterwards. auto_resolve is null when the source type has no auto-resolve rule.

    allOf
    • #exceptionpolicy
  • #8TaskCPTMissed (consumed, fulfillment-execution)

    A task is still open past its CPT deadline.

    Message IDTaskCPTMissed

    type = com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed, source /warehouse/fulfillment-execution, dataschema urn:warehouse:fulfillment-execution:events:TaskCPTMissed:v1. Subject and Kafka key = the task id. Re-fired on every sweep pass while the task stays open: every repeat after the first touches the open case (occurrence + 1, lastSeenAt), never opens a second one. order_ref is WES's work unit id {order_id}-line-{line_no}; task_type is omitted when unknown.

    allOf
    • #consumed
  • #9PackageDiverted (consumed, fulfillment-execution)

    A package was diverted off the standard path.

    Message IDPackageDiverted

    PENDING PRODUCER PROMOTION P1: fulfillment-execution publishes this type on its analytics topic only today; it arrives on warehouse.fulfillment.events (dataschema urn:warehouse:fulfillment-execution:events:PackageDiverted:v1) once the producer's promotion PR merges. type = com.warehouse.wes.fulfillment-execution.package.PackageDiverted, source /warehouse/fulfillment-execution. Subject and Kafka key = the package id.

    allOf
    • #consumed
  • #10WeightDiscrepancyDetected (consumed, fulfillment-execution)

    SLAM found the package weight out of tolerance.

    Message IDWeightDiscrepancyDetected

    PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.fulfillment.events (dataschema urn:warehouse:fulfillment-execution:events:WeightDiscrepancyDetected:v1) once the producer's promotion PR merges. type = com.warehouse.wes.fulfillment-execution.package.WeightDiscrepancyDetected, source /warehouse/fulfillment-execution. Subject and Kafka key = the package id.

    allOf
    • #consumed
  • #11BacklogThresholdBreached (consumed, wes-work-planning)

    A path's backlog depth crossed its alarm threshold.

    Message IDBacklogThresholdBreached

    type = com.warehouse.wes.work-planning.workpool.BacklogThresholdBreached, source /warehouse/wes-work-planning, dataschema urn:warehouse:wes-work-planning:events:BacklogThresholdBreached:v1. Subject and Kafka key = the path id. The published data carries ONLY path_id (the producer's contract); consumers wanting the depth and rate numbers read the producer's telemetry projection instead. The signal re-fires on every observation sweep: repeats touch the open case, never open a second one.

    allOf
    • #consumed
  • #12AcknowledgementDeadlineAtRisk (consumed, network-fulfillment)

    A network order's acknowledgement window closed with no answer.

    Message IDAcknowledgementDeadlineAtRisk

    type = com.warehouse.wes.network-fulfillment.networkorder.AcknowledgementDeadlineAtRisk, source /warehouse/network-fulfillment, dataschema urn:warehouse:network-fulfillment:events:AcknowledgementDeadlineAtRisk:v1. Subject and Kafka key = the network order reference (networkRef). A reported fact that re-fires on every sweep pass while the order is still NEW past acknowledgeBy: repeats touch the open case, never open a second one.

    allOf
    • #consumed
  • #13OrphanedHoldCancelled (consumed, network-fulfillment)

    A hold order-management made for demand nobody decided was cancelled.

    Message IDOrphanedHoldCancelled

    type = com.warehouse.wes.network-fulfillment.networkorder.OrphanedHoldCancelled, source /warehouse/network-fulfillment, dataschema urn:warehouse:network-fulfillment:events:OrphanedHoldCancelled:v1. Subject and Kafka key = the network order reference (networkRef). answer is what order-management said to the cancel (CANCELLED or NOT_FOUND); localOrderId is the held order-management order.

    allOf
    • #consumed
  • #14OrderRepromised (consumed, order-management)

    A missed CPT pushed the order's promise to a later cutoff.

    Message IDOrderRepromised

    type = com.warehouse.wes.order-management.order.OrderRepromised, source /warehouse/order-management, dataschema urn:warehouse:order-management:events:OrderRepromised:v1. Subject and Kafka key = the order id. Never a case source: it is the correlated fact of the auto-resolve rule. The rule reverses the work-unit formula of the open case's source order_ref and compares it with order_id; no match is a no-op (the case stays open).

    allOf
    • #consumed
  • #15UnexpectedReturnReceived (consumed, returns-processing)

    A return line arrived with no authorization.

    Message IDUnexpectedReturnReceived

    PENDING PRODUCER (wave 3): returns-processing ships this type on warehouse.returns-processing.events; the contract is pinned here consumer-first from the fleet plan. type = com.warehouse.wms.returns-processing.returnreceipt.UnexpectedReturnReceived, source /warehouse/returns-processing, dataschema urn:warehouse:returns-processing:events:UnexpectedReturnReceived:v1. Subject and Kafka key = the receipt id. One case per receipt line; repeats touch the open case.

    allOf
    • #consumed
  • #16CartonDiscrepancyRaised (consumed, inbound-receiving)

    A carton did not match its ASN or failed a receiving check.

    Message IDCartonDiscrepancyRaised

    type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised, source /warehouse/inbound-receiving, subject and Kafka key = the receipt id. kind is an open string (UnexpectedCarton, MissingCarton, DuplicateSscc, UnknownGtin, CaseQtyMismatch, MixedCaseDeclaredAsCasePack, UnlabelledCarton, CartonOverLimit, MixedCartonContentMismatch, ...).

    allOf
    • #consumed
  • #17VisitRejected (consumed, yard-management)

    A yard visit was refused at the gate.

    Message IDVisitRejected

    type = com.warehouse.wms.yard-management.yardvisit.VisitRejected, source /warehouse/yard-management, subject and Kafka key = the visit id. Dedup subject = visit_id; the site is site_id. ADR 0010.

    allOf
    • #consumed
  • #18SealExceptionRaised (consumed, yard-management)

    A trailer seal differs from the one the carrier declared.

    Message IDSealExceptionRaised

    type = com.warehouse.wms.yard-management.trailer.SealExceptionRaised, source /warehouse/yard-management, subject and Kafka key = the trailer id. Dedup subject = <trailer_id>/<raised_at> (a later visit of the same trailer is its own case; the same raise re-published touches). ADR 0010.

    allOf
    • #consumed
  • #19TrailerDwellExceeded (consumed, yard-management)

    A trailer stayed on site past its dwell threshold.

    Message IDTrailerDwellExceeded

    type = com.warehouse.wms.yard-management.trailer.TrailerDwellExceeded, source /warehouse/yard-management, subject and Kafka key = the trailer id. The payload carries no instant: the dedup subject is <trailer_id>/<CloudEvents time> (the producer raises once per trailer and threshold crossing). ADR 0010.

    allOf
    • #consumed
  • #20YardCheckClosed (consumed, yard-management)

    A yard audit closed; each discrepancy becomes its own case.

    Message IDYardCheckClosed

    type = com.warehouse.wms.yard-management.yardcheck.YardCheckClosed, source /warehouse/yard-management, subject and Kafka key = the yard check id. ONE case per entry of discrepancies, keyed <yard_check_id>/<kind>/<location_code>/<trailer_id, else unit_number, else ->; the CloudEvents id is claimed once for the whole check. A check without discrepancies opens nothing. ADR 0010.

    allOf
    • #consumed
  • #21DockAppointmentNoShow (consumed, dock-scheduling)

    A carrier missed its dock appointment window.

    Message IDDockAppointmentNoShow

    type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow, source /warehouse/dock-scheduling, subject and Kafka key = the appointment id. Dedup subject = appointment_id; NO_SHOW is terminal in dock-scheduling, so one case per appointment. ADR 0010.

    allOf
    • #consumed
  • #22PackageMissedLoad (consumed, outbound-shipping)

    A package was not loaded by its cutoff or by departure.

    Message IDPackageMissedLoad

    type = com.warehouse.wms.outbound-shipping.shippingpackage.PackageMissedLoad, source /warehouse/outbound-shipping, dataschema urn:warehouse:outbound-shipping:events:PackageMissedLoad:v1. Subject and Kafka key = the package id. The producer raises it at most once per package and load; source_order_id is omitted when the manifest carried none. One problem-solve case per missed package (ADR 0011).

    allOf
    • #consumed
  • #23DiscrepancyDetected (consumed, inventory-storage)

    A cycle count found the bin did not match system records.

    Message IDDiscrepancyDetected

    PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.inventory.events (dataschema urn:warehouse:inventory-storage:events:DiscrepancyDetected:v1) once the producer's promotion PR merges. type = com.warehouse.wms.inventory-storage.bin.DiscrepancyDetected, source /warehouse/inventory-storage. Subject and Kafka key = the bin id.

    allOf
    • #consumed
  • #24ItemUnlocated (consumed, inventory-storage)

    A physical item's bin is no longer known; the stock is lost.

    Message IDItemUnlocated

    PENDING PRODUCER PROMOTION P1: analytics-only today; arrives on warehouse.inventory.events (dataschema urn:warehouse:inventory-storage:events:ItemUnlocated:v1) once the producer's promotion PR merges. type = com.warehouse.wms.inventory-storage.stock.ItemUnlocated, source /warehouse/inventory-storage. Subject = the stock unit id, Kafka key = the SKU.

    allOf
    • #consumed
  • #25StockHeld (consumed, inventory-storage)

    A unit of stock was booked HELD; no usable quantity until dispositioned.

    Message IDStockHeld

    Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012; the producer's own contract is inventory-storage ADR 0052). type = com.warehouse.wms.inventory-storage.stock.StockHeld, source /warehouse/inventory-storage, dataschema urn:warehouse:inventory-storage:events:StockHeld:v1. Subject = Kafka key = the held unit id. ONE case opens per held unit id: the payload (sku, quantity, hold reason, receipt/ASN/line source) is frozen on it; a re-emitted hold touches the same case.

    allOf
    • #consumed
  • #26StockReleased (consumed, inventory-storage)

    A held unit was released; the quantity re-enters stock as a fresh staged receipt.

    Message IDStockReleased

    Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012). The producer raises it ONLY on a RELEASE disposition, in addition to StockDispositioned (inventory-storage ADR 0052), so in practice it arrives as the second fact of a pair whose first fact already closed the case; handling it as a close in its own right covers either arrival order. It auto-resolves the held unit's case with a released note. type = com.warehouse.wms.inventory-storage.stock.StockReleased, subject = Kafka key = the held unit id.

    allOf
    • #consumed
  • #27StockDispositioned (consumed, inventory-storage)

    A disposition was decided for a held unit.

    Message IDStockDispositioned

    Consumed under HELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012). Raised for all four dispositions (inventory-storage ADR 0052): RELEASE, RETURN_TO_VENDOR and SCRAP end the hold, so the case auto-resolves with the disposition in the resolution note; REWORK KEEPS the unit held, so the case stays open and the arrival is recorded as an occurrence. type = com.warehouse.wms.inventory-storage.stock.StockDispositioned, subject = Kafka key = the held unit id.

    allOf
    • #consumed
  • #28Exception opened (analytics twin)

    The analytics-stream twin of ExceptionOpened (ADR 0013).

    Message IDExceptionOpenedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionOpened:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #29Exception triaged (analytics twin)

    The analytics-stream twin of ExceptionTriaged (ADR 0013).

    Message IDExceptionTriagedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionTriaged:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #30Exception assigned (analytics twin)

    The analytics-stream twin of ExceptionAssigned (ADR 0013).

    Message IDExceptionAssignedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionAssigned:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #31Exception escalated (analytics twin)

    The analytics-stream twin of ExceptionEscalated (ADR 0013).

    Message IDExceptionEscalatedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionEscalated:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #32Exception resolved (analytics twin)

    The analytics-stream twin of ExceptionResolved (ADR 0013).

    Message IDExceptionResolvedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionResolved:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #33Exception auto-resolved (analytics twin)

    The analytics-stream twin of ExceptionAutoResolved (ADR 0013).

    Message IDExceptionAutoResolvedAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionAutoResolved:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics
  • #34Exception policy declared (analytics twin)

    The analytics-stream twin of ExceptionPolicyDeclared (ADR 0013).

    Message IDExceptionPolicyDeclaredAnalytics

    Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:exception-management:analytics:ExceptionPolicyDeclared:v1. Consumed only by cmd/exceptions-projector.

    allOf
    • #analytics

Schemas

  • object
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • object
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf