Road to State Machines IV - But How Do We Let Data Influence Transitions Without Turning Every Value into Another State?

Our lifecycle now has one explicit transition table. For a valid order, it tells us: The operations consult that table before making a change. The code that lists available actions consults it too. But Part III ended with another requirement: Consider two orders. Both are paid, and both retain their captured payment records: Order Status Payment record Delivery address A PAID Present Supported B PAID Present Unsupported Both records satisfy our existing invariants.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in