4 ms·
I tends to have a config part where all possible transition are listed in a type safe way. ( error transition as well. Basically what is not desribed there is a
by dopidopHN 4y ago
I tends to have a config part where all possible transition are listed in a type safe way. ( error transition as well. Basically what is not desribed there is a bug or a unknown error transition )
I also tends to have state machine calling other machine or being composed of 2-3 smaller ones.
I save the state in some serialized form in DB if needed.
It’s great for customer flow : like; tracking where they are in the KYC process or onboarding and deciding what to do next.
Without having 50 nested switch statement.