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.
Fleet-shared Kafka broker (host supplied by the deployment environment).
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.
Available only on servers:
Accepts one of the following messages:
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.
A TaskCPTMissed fact opened the case for task task-8a1f.
{
"specversion": "1.0",
"id": "3f2a9c1e-6b48-4d17-9a0f-8e5d2c7b4a11",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionOpened",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:00:05Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionOpened:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"source_type": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"source_subject": "task-8a1f",
"site_id": null,
"severity": "HIGH",
"queue": "cps-front",
"opened_at": "2026-10-21T09:00:05Z",
"sla_due_at": "2026-10-21T09:30:05Z",
"source_event_id": "6f1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"source_payload": {
"task_id": "task-8a1f",
"order_ref": "wu-8a1f",
"task_type": "PICK",
"cpt": "2026-09-30T14:55:00Z"
}
}
}
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.
An operator moved the case to the inbound queue at high severity.
{
"specversion": "1.0",
"id": "5c4b2d8f-1a39-4e60-8b2d-7f6e5a4b3c22",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionTriaged",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionTriaged:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"severity": "CRITICAL",
"queue": "cps-inbound",
"actor": "op-jane",
"at": "2026-10-21T09:05:00Z"
}
}
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.
op-marc took the case.
{
"specversion": "1.0",
"id": "7e8f9a0b-2c4d-4e5f-8a9b-0c1d2e3f4a33",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionAssigned",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionAssigned:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"assignee": "op-marc",
"actor": "op-jane",
"at": "2026-10-21T09:10:00Z"
}
}
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).
The case breached its 30-minute SLA.
{
"specversion": "1.0",
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c44",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionEscalated",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:30:06Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionEscalated:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"sla_due_at": "2026-10-21T09:30:05Z",
"at": "2026-10-21T09:30:06Z"
}
}
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).
The task was re-run and the promise restored.
{
"specversion": "1.0",
"id": "1f2e3d4c-5b6a-4789-9abc-def012345678",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionResolved",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:25:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionResolved:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"resolution_code": "WORK_COMPLETED",
"root_cause": "OPERATOR_UNAVAILABLE",
"note": null,
"actor": "op-marc",
"at": "2026-10-21T09:25:00Z"
}
}
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.
The repromised order closed the CPT-miss case.
{
"specversion": "1.0",
"id": "2e3f4a5b-6c7d-4899-a0bc-def012345678",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionAutoResolved",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:20:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionAutoResolved:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"rule_id": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed->com.warehouse.wes.order-management.order.OrderRepromised",
"correlated_type": "com.warehouse.wes.order-management.order.OrderRepromised",
"correlated_event_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"note": null,
"at": "2026-10-21T09:20:00Z"
}
}
ADR 0012 — a RETURN_TO_VENDOR disposition closed the held-stock case.
{
"specversion": "1.0",
"id": "5c4b3a29-1e2f-4a89-b7c6-d5e4f3a2b1c0",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionAutoResolved",
"subject": "case-2e3f4a5b-6c7d-4899-a0bc-def012345679",
"time": "2026-11-12T10:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionAutoResolved:v1",
"data": {
"case_id": "case-2e3f4a5b-6c7d-4899-a0bc-def012345679",
"rule_id": "com.warehouse.wms.inventory-storage.stock.StockHeld->com.warehouse.wms.inventory-storage.stock.StockDispositioned",
"correlated_type": "com.warehouse.wms.inventory-storage.stock.StockDispositioned",
"correlated_event_id": "0b3a8d96-4c79-4e5a-9f60-2e410a5c3d78",
"note": "disposition RETURN_TO_VENDOR",
"at": "2026-11-12T10:30:00Z"
}
}
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.
TaskCPTMissed defaults to HIGH, cps-front, 30-minute SLA, repromise auto-resolve.
{
"specversion": "1.0",
"id": "4a5b6c7d-8e9f-4a0b-8c1d-2e3f4a5b6c55",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptionpolicy.ExceptionPolicyDeclared",
"subject": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"time": "2026-10-21T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:events:ExceptionPolicyDeclared:v1",
"data": {
"source_type": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"version": 1,
"severity": "HIGH",
"queue": "cps-front",
"sla_minutes": 30,
"auto_resolve": {
"on_type": "com.warehouse.wes.order-management.order.OrderRepromised",
"within_minutes": 60
}
}
}
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.
Available only on servers:
Accepts one of the following messages:
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.
A TaskCPTMissed fact opened the case for task task-8a1f.
{
"specversion": "1.0",
"id": "3f2a9c1e-6b48-4d17-9a0f-8e5d2c7b4a11",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionOpened",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:00:05Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionOpened:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"source_type": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"source_subject": "task-8a1f",
"site_id": null,
"severity": "HIGH",
"queue": "cps-front",
"opened_at": "2026-10-21T09:00:05Z",
"sla_due_at": "2026-10-21T09:30:05Z",
"source_event_id": "6f1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"source_payload": {
"task_id": "task-8a1f",
"order_ref": "wu-8a1f",
"task_type": "PICK",
"cpt": "2026-09-30T14:55:00Z"
}
}
}
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.
An operator moved the case to the inbound queue at high severity.
{
"specversion": "1.0",
"id": "5c4b2d8f-1a39-4e60-8b2d-7f6e5a4b3c22",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionTriaged",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionTriaged:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"severity": "CRITICAL",
"queue": "cps-inbound",
"actor": "op-jane",
"at": "2026-10-21T09:05:00Z"
}
}
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.
op-marc took the case.
{
"specversion": "1.0",
"id": "7e8f9a0b-2c4d-4e5f-8a9b-0c1d2e3f4a33",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionAssigned",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionAssigned:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"assignee": "op-marc",
"actor": "op-jane",
"at": "2026-10-21T09:10:00Z"
}
}
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.
The case breached its 30-minute SLA.
{
"specversion": "1.0",
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c44",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionEscalated",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:30:06Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionEscalated:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"sla_due_at": "2026-10-21T09:30:05Z",
"at": "2026-10-21T09:30:06Z"
}
}
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.
The task was re-run and the promise restored.
{
"specversion": "1.0",
"id": "1f2e3d4c-5b6a-4789-9abc-def012345678",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionResolved",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:25:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionResolved:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"resolution_code": "WORK_COMPLETED",
"root_cause": "OPERATOR_UNAVAILABLE",
"note": null,
"actor": "op-marc",
"at": "2026-10-21T09:25:00Z"
}
}
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.
The repromised order closed the CPT-miss case.
{
"specversion": "1.0",
"id": "2e3f4a5b-6c7d-4899-a0bc-def012345678",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptioncase.ExceptionAutoResolved",
"subject": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"time": "2026-10-21T09:20:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionAutoResolved:v1",
"data": {
"case_id": "case-1d2e3f4a-5b6c-4789-9abc-def012345678",
"rule_id": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed->com.warehouse.wes.order-management.order.OrderRepromised",
"correlated_type": "com.warehouse.wes.order-management.order.OrderRepromised",
"correlated_event_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"at": "2026-10-21T09:20:00Z"
}
}
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.
TaskCPTMissed defaults to HIGH, cps-front, 30-minute SLA, repromise auto-resolve.
{
"specversion": "1.0",
"id": "4a5b6c7d-8e9f-4a0b-8c1d-2e3f4a5b6c55",
"source": "/warehouse/exception-management",
"type": "com.warehouse.wes.exception-management.exceptionpolicy.ExceptionPolicyDeclared",
"subject": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"time": "2026-10-21T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:exception-management:analytics:ExceptionPolicyDeclared:v1",
"data": {
"source_type": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"version": 1,
"severity": "HIGH",
"queue": "cps-front",
"sla_minutes": 30,
"auto_resolve": {
"on_type": "com.warehouse.wes.order-management.order.OrderRepromised",
"within_minutes": 60
}
}
}
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).
Available only on servers:
Accepts one of the following messages:
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.
A PICK task is past its 14:55 CPT.
{
"specversion": "1.0",
"id": "6f1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"source": "/warehouse/fulfillment-execution",
"type": "com.warehouse.wes.fulfillment-execution.task.TaskCPTMissed",
"subject": "task-8a1f",
"time": "2026-09-30T15:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:fulfillment-execution:events:TaskCPTMissed:v1",
"data": {
"task_id": "task-8a1f",
"order_ref": "wu-8a1f",
"task_type": "PICK",
"cpt": "2026-09-30T14:55:00Z"
}
}
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.
Package p1 left the standard path.
{
"specversion": "1.0",
"id": "6f1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4c",
"source": "/warehouse/fulfillment-execution",
"type": "com.warehouse.wes.fulfillment-execution.package.PackageDiverted",
"subject": "p1",
"time": "2026-09-30T15:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:fulfillment-execution:events:PackageDiverted:v1",
"data": {
"package_id": "p1"
}
}
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.
The package weighed 1200 g against an expected 1000 g.
{
"specversion": "1.0",
"id": "6f1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4d",
"source": "/warehouse/fulfillment-execution",
"type": "com.warehouse.wes.fulfillment-execution.package.WeightDiscrepancyDetected",
"subject": "p1",
"time": "2026-09-30T15:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:fulfillment-execution:events:WeightDiscrepancyDetected:v1",
"data": {
"package_id": "p1",
"expected_g": 1000,
"actual_g": 1200
}
}
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.
Available only on servers:
Accepts the following message:
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.
The pack-singles buffer went over its alarm threshold.
{
"specversion": "1.0",
"id": "9c4a1e60-8b72-4d31-a5f9-7e2c3b0d6f18",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.BacklogThresholdBreached",
"subject": "pack-singles",
"time": "2026-08-21T22:25:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:BacklogThresholdBreached:v1",
"data": {
"path_id": "pack-singles"
}
}
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.
Available only on servers:
Accepts one of the following messages:
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.
Network order po-1's acknowledgement window closed unanswered.
{
"specversion": "1.0",
"id": "1a2b3c4d-5e6f-4788-9900-aabbccddeeff",
"source": "/warehouse/network-fulfillment",
"type": "com.warehouse.wes.network-fulfillment.networkorder.AcknowledgementDeadlineAtRisk",
"subject": "po-1",
"time": "2026-09-24T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:network-fulfillment:events:AcknowledgementDeadlineAtRisk:v1",
"data": {
"networkRef": "po-1",
"siteId": "site-1",
"acknowledgeBy": "2026-09-24T08:00:00Z",
"at": "2026-09-24T08:00:00Z"
}
}
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.
The hold behind network order po-1 was cancelled after its window closed.
{
"specversion": "1.0",
"id": "2b3c4d5e-6f70-4899-8011-bbccddeeff00",
"source": "/warehouse/network-fulfillment",
"type": "com.warehouse.wes.network-fulfillment.networkorder.OrphanedHoldCancelled",
"subject": "po-1",
"time": "2026-09-23T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:network-fulfillment:events:OrphanedHoldCancelled:v1",
"data": {
"networkRef": "po-1",
"siteId": "site-1",
"localOrderId": "ord-1",
"acknowledgeBy": "2026-09-23T06:00:00Z",
"answer": "CANCELLED",
"at": "2026-09-23T08:00:00Z"
}
}
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.
Available only on servers:
Accepts the following message:
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).
The promise moved from the 12:00 to the 18:00 cutoff.
{
"specversion": "1.0",
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.order.OrderRepromised",
"subject": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2",
"time": "2026-09-14T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:order-management:events:OrderRepromised:v1",
"data": {
"order_id": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2",
"cpt_id_old": "sp1-1200",
"cpt_id_new": "sp1-1800",
"reason": "TaskCPTMissed"
}
}
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.
Available only on servers:
Accepts the following message:
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.
Two units of SKU-9 arrived at site-1 with no RMA.
{
"specversion": "1.0",
"id": "8d7c6b5a-4f3e-4d2c-9b1a-0f9e8d7c6b5e",
"source": "/warehouse/returns-processing",
"type": "com.warehouse.wms.returns-processing.returnreceipt.UnexpectedReturnReceived",
"subject": "rcpt-31c7",
"time": "2026-10-21T10:12:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:returns-processing:events:UnexpectedReturnReceived:v1",
"data": {
"receipt_id": "rcpt-31c7",
"line_no": 1,
"sku": "SKU-9",
"quantity": 2,
"site_id": "site-1",
"received_at": "2026-10-21T10:12:00Z"
}
}
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.
Available only on servers:
Accepts the following message:
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, ...).
A case declared 12 units but 10 were counted.
{
"specversion": "1.0",
"id": "5b2f0c1e-7a44-4b58-8f5d-2f6c1a9d3e10",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised",
"subject": "rcpt-77",
"time": "2026-10-24T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:CartonDiscrepancyRaised:v1",
"data": {
"receipt_id": "rcpt-77",
"sscc": "340123450000000013",
"kind": "CaseQtyMismatch",
"expected": "12",
"actual": "10",
"at": "2026-10-24T09:00:00Z"
}
}
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.
Available only on servers:
Accepts one of the following messages:
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.
A seal mismatch refused the visit.
{
"specversion": "1.0",
"id": "0a1f6c52-3d7e-4c1b-9a10-7e2b5d6c8f01",
"source": "/warehouse/yard-management",
"type": "com.warehouse.wms.yard-management.yardvisit.VisitRejected",
"subject": "visit-3f9a",
"time": "2026-11-05T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:yard-management:events:VisitRejected:v1",
"data": {
"visit_id": "visit-3f9a",
"site_id": "SITE-1",
"carrier_scac": "ABCD",
"appointment_id": "appt-77c1",
"reason": "SEAL_MISMATCH",
"rejected_at": "2026-11-05T08:00:00Z"
}
}
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.
Expected seal S-1001, found S-2002.
{
"specversion": "1.0",
"id": "1b2e7d63-4e8f-4d2c-8b21-8f3c6e7d9a02",
"source": "/warehouse/yard-management",
"type": "com.warehouse.wms.yard-management.trailer.SealExceptionRaised",
"subject": "trl-5d20",
"time": "2026-11-05T08:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:yard-management:events:SealExceptionRaised:v1",
"data": {
"trailer_id": "trl-5d20",
"site_id": "SITE-1",
"appointment_id": "appt-77c1",
"expected_seal_number": "S-1001",
"found_seal_number": "S-2002",
"raised_at": "2026-11-05T08:30:00Z"
}
}
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.
A dry van 120 minutes past its threshold.
{
"specversion": "1.0",
"id": "2c3f8e74-5f90-4e3d-9c32-9a4d7f8eab03",
"source": "/warehouse/yard-management",
"type": "com.warehouse.wms.yard-management.trailer.TrailerDwellExceeded",
"subject": "trl-5d20",
"time": "2026-11-05T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:yard-management:events:TrailerDwellExceeded:v1",
"data": {
"trailer_id": "trl-5d20",
"site_id": "SITE-1",
"kind": "DRY_VAN",
"dwell_minutes": 3000,
"threshold_minutes": 2880,
"location_code": "SPOT-04"
}
}
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.
One trailer missing, one unexpected.
{
"specversion": "1.0",
"id": "3d409f85-6aa1-4f4e-8d43-ab5e809fbc04",
"source": "/warehouse/yard-management",
"type": "com.warehouse.wms.yard-management.yardcheck.YardCheckClosed",
"subject": "yck-9e41",
"time": "2026-11-05T11:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:yard-management:events:YardCheckClosed:v1",
"data": {
"yard_check_id": "yck-9e41",
"site_id": "SITE-1",
"closed_at": "2026-11-05T11:00:00Z",
"discrepancies": [
{
"kind": "MISSING",
"location_code": "SPOT-01",
"trailer_id": "trl-5d20",
"unit_number": "TR100"
},
{
"kind": "UNEXPECTED",
"location_code": "SPOT-02",
"trailer_id": null,
"unit_number": "TR200"
}
]
}
}
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.
Available only on servers:
Accepts the following message:
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.
An inbound appointment whose grace period lapsed.
{
"specversion": "1.0",
"id": "4e51a096-7bb2-405f-9e54-bc6f91a0cd05",
"source": "/warehouse/dock-scheduling",
"type": "com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow",
"subject": "appt-77c1",
"time": "2026-11-05T11:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:dock-scheduling:events:DockAppointmentNoShow:v1",
"data": {
"appointment_id": "appt-77c1",
"site_id": "SITE-1",
"door_code": "DOOR-03",
"direction": "INBOUND",
"carrier_scac": "ABCD",
"window_end": "2026-11-05T10:00:00Z",
"version": 3
}
}
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.
Available only on servers:
Accepts one of the following messages:
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.
Bin A-12-3 counted at 47 units against a system record of 50.
{
"specversion": "1.0",
"id": "c2a90b76-8e34-4f51-9d07-4b6e1c8a37f9",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.bin.DiscrepancyDetected",
"subject": "A-12-3",
"time": "2026-08-21T23:00:01Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:DiscrepancyDetected:v1",
"data": {
"bin_id": "A-12-3",
"counted": 47,
"system": 50
}
}
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.
Three units of SKU-1001 could not be found in bin A-12-3.
{
"specversion": "1.0",
"id": "7e0d5a83-4f19-42b7-a3c6-8b1e9d2f0c45",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.ItemUnlocated",
"subject": "su-7781",
"time": "2026-08-21T23:00:02Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:ItemUnlocated:v1",
"data": {
"stock_unit_id": "su-7781",
"sku": "SKU-1001",
"bin_id": "A-12-3",
"quantity": 3
}
}
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.
Four damaged units of SKU-9 booked as a held unit off receipt rcpt-77 line 2.
{
"specversion": "1.0",
"id": "8f1e6b94-2a57-4c38-9d47-0c2f8e3a1b56",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.StockHeld",
"subject": "hu-4471",
"time": "2026-11-12T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockHeld:v1",
"data": {
"held_unit_id": "hu-4471",
"sku": "SKU-9",
"quantity": 4,
"reason": "DAMAGED",
"receipt_id": "rcpt-77",
"asn_number": "ASN-88",
"line_no": 2,
"held_at": "2026-11-12T09:00:00Z"
}
}
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.
The held unit was released; the case auto-resolves.
{
"specversion": "1.0",
"id": "9a2f7c85-3b68-4d49-8e5f-1d309f4b2c67",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.StockReleased",
"subject": "hu-4471",
"time": "2026-11-12T10:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockReleased:v1",
"data": {
"held_unit_id": "hu-4471",
"sku": "SKU-9",
"quantity": 4,
"receipt_id": "rcpt-77",
"asn_number": "ASN-88",
"line_no": 2,
"released_at": "2026-11-12T10:00:00Z"
}
}
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.
The damaged units go back to the vendor; the case auto-resolves.
{
"specversion": "1.0",
"id": "0b3a8d96-4c79-4e5a-9f60-2e410a5c3d78",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.StockDispositioned",
"subject": "hu-4471",
"time": "2026-11-12T10:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockDispositioned:v1",
"data": {
"held_unit_id": "hu-4471",
"sku": "SKU-9",
"quantity": 4,
"disposition": "RETURN_TO_VENDOR",
"reason": "DAMAGED",
"receipt_id": "rcpt-77",
"asn_number": "ASN-88",
"line_no": 2,
"decided_at": "2026-11-12T10:30:00Z"
}
}
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.
Available only on servers:
Accepts the following message:
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).
The 16:00 cutoff passes with pkg-2055 still staged.
{
"specversion": "1.0",
"id": "3f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e0b",
"source": "/warehouse/outbound-shipping",
"type": "com.warehouse.wms.outbound-shipping.shippingpackage.PackageMissedLoad",
"subject": "pkg-2055",
"time": "2026-11-06T16:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:outbound-shipping:events:PackageMissedLoad:v1",
"data": {
"package_id": "pkg-2055",
"load_id": "load-7f3a",
"site_id": "SITE-1",
"source_order_id": "order-88423",
"cutoff": "2026-11-06T16:00:00Z",
"detected_at": "2026-11-06T16:00:00Z",
"version": 2
}
}
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.
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.
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.
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).
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).
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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, ...).
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.