Load state machine
Last updated 2026-10-19
Load states and events: from draft to delivered, covering load tasks, exceptions, and cancellation rules.

Event table#
| Event | From | To | Trigger | Actor | Side effects |
|---|---|---|---|---|---|
| [create load task] | draft | planned | Create the load and its loading task | Warehouse | WMS task created (task_type=load) |
| [first load-scan] | planned | loading | First pallet scanned at the dock | Loader | — |
| [close] | loading | fulfilled | Loading done, truck leaves | Warehouse | Linked outbound orders → fulfilled in batch |
| [flag exception] | loading | exception | Loading issue (wrong goods / truck problem) | Loader | On hold |
| [resolve] | exception | loading | Exception resolved | Supervisor | — |
| [cancel] | exception | cancelled | Cannot be resolved | Supervisor | — |
| [deliver] | fulfilled | delivered | Delivery confirmed (POD) | System / Driver | — |
| [cancel] | draft / planned | cancelled | Cancel the plan | Warehouse | Not allowed once loading starts |
planned means "ready to load": the loading task is created but not started. fulfilled means the truck has left (goods handed off).