Skip to main content

Exception Management

exception-management is the bounded context that owns Problem Solve: the place where the anomaly facts other contexts already publish become owned cases. A missed CPT, a breached backlog threshold, an at-risk network acknowledgement, a count discrepancy, a diverted package, an unexpected return — each is a fact on a Kafka topic. This context consumes those facts, opens exactly one case per problem, and runs the case through triage, assignment, an SLA clock and resolution with a recorded root cause. It is a WES-tier Supporting context: it never fixes the anomaly itself; it makes sure no anomaly is invisible, unowned or unmeasured.

  • Cases are opened only from consumed facts — there is deliberately no POST /exceptions (ADR 0001).
  • Operators triage, assign and resolve over REST; every accepted transition records its actor.
  • A versioned ExceptionPolicy per source type sets severity, queue, SLA minutes and an optional auto-resolve rule (for example: an OrderRepromised fact closes the TaskCPTMissed case of the same work unit within its window).
  • A bounded sweeper flags SLA breaches (ExceptionEscalated) without ever blocking work.
  • Case facts leave through a transactional outbox as CloudEvents 1.0; the event catalogue is the summary.
  • A read-only MCP server (cmd/mcp, default off in the chart) exposes the caseload to warehouse-ops-agent — see MCP tools.

Where it sits​

It consumes seventeen case sources across nine sibling topics, two held-stock closing facts and one correlation fact (OrderRepromised), and publishes its own case lifecycle on warehouse.exception-management.events:

The full consumed/published tables are on the event catalogue; the field-level detail is on Domain events.

Explore​

Disclaimer

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic.