Warehouse execution (WES) · Supporting domain · EventStorming board
exception-management
Gives every problem another context detects one owner: a case with severity, queue, deadline and root cause. Cases only ever start from a fact.
- events published
- 7
- commands
- 9
- policies
- 12
- read models
- 3
- hot spots
- 5
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventException
Opened - Pivotal eventException
Triaged - Pivotal eventException
Assigned - Pivotal eventException
Resolved - Pivotal eventException
Auto Resolved
Listens to (10): contexts whose events this one reacts to
Tells (0): contexts that react to its events
none
The board, row by row
16 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.
- Event
- Command
- Actor
- Aggregate
- Policy
- Read model
- External system
- Hot spot
- Opportunity
-
Open a case for a missed cut-off
A task is past its cut-off time. The first report opens a case with the severity, queue and deadline its policy sets. The report repeats at every sweep, so a repeat only adds to the count. A diverted or wrongly weighed package works the same way.
Systemfulfillment-execution EventTaskCPTMissed PolicyWhenever a task misses its cut-off, open a case, or count it on the case already openRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · application/usecases/consume_fact.go · adapters/inbound/kafka/fulfillment_consumer.go · domain/exceptioncase/case.go
-
Triage a case
An operator sets the severity and the queue of a case. It works on an escalated case too. A resolved case refuses it.
ActorOperatorCommandTriageException POST /exceptions/{caseId}/triage-decisionsAggregateCaseEventExceptionTriaged Source: application/usecases/commands.go · domain/exceptioncase/case.go
-
Assign a case to an owner
An operator gives the case an owner. It can be reassigned until the case is resolved.
ActorOperatorCommandAssignException POST /exceptions/{caseId}/assignmentsAggregateCaseEventExceptionAssigned Source: application/usecases/commands.go · domain/exceptioncase/case.go
-
Resolve a case with a root cause
An operator closes the case with a resolution code and a root cause. Resolved is final: later commands are refused, and a later matching fact only adds to the count, it never reopens the case.
ActorOperatorCommandResolveException POST /exceptions/{caseId}/resolutionsAggregateCaseEventExceptionResolved Source: application/usecases/commands.go · domain/exceptioncase/case.go
-
Set how a kind of problem is handled
An operator declares the severity, queue, deadline in minutes and an optional auto-close rule for one kind of fact. Each declaration is a new version. Cases already open keep what they were opened with.
ActorOperatorCommandDeclareException PUT /exception-policies/{sourceType}Policy AggregatePolicyEventExceptionPolicy Declared Source: application/usecases/declare_policy.go · domain/exceptionpolicy/policy.go
-
Open a case for a work backlog
wes-work-planning raises an alarm when the waiting work on a process path passes its threshold. The case is kept per path, and the alarm carries nothing but the path.
Systemwes-work- planning EventBacklogThreshold Breached PolicyWhenever a backlog threshold is breached, open a case for that path, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/work_planning_consumer.go
-
Open a case for a late network order
An order sent to another site is at risk of missing its acknowledgement deadline, or its hold was cancelled as orphaned. One case is kept per network order. The report repeats while the risk lasts.
Systemnetwork-fulfillment EventAcknowledgementDeadline At Risk PolicyWhenever a network order is at risk, open a case for it, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/network_fulfillment_consumer.go
-
Open a case for an unexpected return
A return arrives that nobody announced. One case is kept per return receipt.
Systemreturns-processing EventUnexpectedReturn Received PolicyWhenever an unexpected return is received, open a case for its receipt, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/returns_consumer.go
-
Open a case for a carton problem
Receiving reports a carton that does not match its ASN. Missing, unexpected or mismatched cartons go to the problem-solve queue. Unlabelled or over-limit ones go to the receiving lead as low-priority information.
Systeminbound-receiving EventCartonDiscrepancy Raised PolicyWhenever a carton discrepancy is raised, open one case per receipt, carton and kind, routed by kindRead modelRoutes by kind of carton problemCommandOpenCarton started by the policyDiscrepancy AggregateCaseEventExceptionOpened Source: application/usecases/carton_discrepancy.go · adapters/inbound/kafka/carton_discrepancy_consumer.go · 0006-carton-discrepancy-consumer-and-routing.md
-
Open a case for a yard problem
A trailer's seal differs from the one declared, a visit was turned away, a trailer overstayed, or a yard audit found a trailer missing. Each goes to the yard supervisor. A seal mismatch is the only high-severity one.
Systemyard-management EventSealException Raised PolicyWhenever the yard reports a seal mismatch, rejected visit, long stay or audit finding, open a caseRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/yard_check.go · adapters/inbound/kafka/yard_exceptions_consumer.go · 0010-yard-exceptions-consumers-and-routing.md
-
Open a case for a missed appointment
A carrier never showed for its dock appointment. One case is kept per appointment and goes to the dock planner.
Systemdock-scheduling EventDockAppointment No Show PolicyWhenever an appointment is a no-show, open a case for it, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/dock_scheduling_exceptions_consumer.go · 0010-yard-exceptions-consumers-and-routing.md
-
Open a case for a stock problem
A bin count disagrees with the books, an item cannot be found, or a unit is put on hold. Each opens a case. A held unit gets exactly one, however often it is reported.
Systeminventory-storage EventDiscrepancyDetected PolicyWhenever stock is in doubt or held, open a case for the bin or unit, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/inventory_exceptions_consumer.go · adapters/inbound/kafka/held_stock_consumer.go
-
Open a case for a package that missed its truck
A package was not loaded by its cut-off or by the trailer's departure. One case is kept per package, even if it misses a later load too. It goes to the problem solvers.
Systemoutbound-shipping EventPackageMissed Load PolicyWhenever a package misses its load, open a case for the package, or count it on the open oneRead modelHandling policy for this kind of factCommandOpenOr started by the policyTouch Exception AggregateCaseEventExceptionOpened Source: application/usecases/open_or_touch.go · adapters/inbound/kafka/outbound_shipping_consumer.go · 0011-package-missed-load-consumer.md
-
Escalate a case past its deadline
A sweep, once a minute by default, flags every open case that is past its deadline. Escalation is a flag set once per case. It never blocks work: the case can still be triaged, assigned and resolved.
TimeSLA sweepPolicyEvery sweep, any open case past its deadline and not yet flagged is escalated, onceCommandSweepSLABreaches started by the clockAggregateCaseEventExceptionEscalated Source: application/usecases/sweep_sla.go · domain/exceptioncase/case.go
-
Close a case when the order is re-promised
order-management re-promises an order. If an open cut-off case belongs to that order, and its policy has an auto-close rule whose time window has not passed, the case closes itself. No match leaves it open.
Systemorder-management EventOrderRepromised PolicyWhenever an order is re-promised, close the matching open case if its policy rule allowsRead modelOpen casesRead modelHandling policy for this kind of factCommandAutoResolve started by the policyOn Correlation AggregateCaseEventExceptionAuto Resolved Source: application/usecases/auto_resolve.go · adapters/inbound/kafka/order_correlation_consumer.go · domain/exceptionpolicy/rule.go
-
Close a held-stock case when the hold ends
When held stock is released, returned to the vendor or scrapped, its case closes with the outcome in the note. Rework keeps the case open and counts another round.
Systeminventory-storage EventStockDispositioned PolicyWhenever held stock is released, returned or scrapped, close the case of that unitRead modelOpen casesCommandAutoResolve started by the policyHeld Stock AggregateCaseEventExceptionAuto Resolved Source: application/usecases/held_stock.go · adapters/inbound/kafka/held_stock_consumer.go · 0012-held-stock-exception-cases.md
Hot spots and opportunities
Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.
- Hot spotA fact whose kind has no declared handling policy is logged and skipped, not turned into a case.
- Hot spotUnderstaffed paths and stuck transfers are planned sources that are not built: they exist only on their producers' reporting streams.
- Hot spotA person cannot open a case by hand. Manual creation is left to a later version, and POST /exceptions is always refused.
- Hot spotHeld units booked before the consumer first ran get no case. Nothing rebuilds history that was already dropped.
- Hot spotRouting works per kind of fact, not per detail. Another queue for one yard finding or one reason needs its own policy.
Opportunities
- Opportunitylabor-performance may read ExceptionResolved later, to relate cases to labour cost.
- OpportunityA missed-load case could auto-close when the package loads on its next load, if a later fleet decision wants that.
- OpportunityIf repeated rework rounds become noise on a held-stock case, a rework-aware note is a possible follow-up.
This board is a reconstruction from the code and documentation of exception-management at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.