I am wondering what might I consider as States when I am asked to model state of a Booking Process (eg. Booking a Movie Ticket Online).
I did something like

It looks abit bloated mainly because of the validation. Should I even have a Validating XXX state? Or should it be something more like:

It all depends if the validation processes are synchronous or asynchronous.
For synchronous validation, there is no need for the validation state. The validation result is given immediately, the system never remains in a validation phase.
For asynchronous validation, a validation state is required because the validation result event is not immediate but is received later on. Typically an asynchronous call such as "startValidation" is invoked upon entering the validation state, and transitions handle the events "validationSuccess" and "validationError"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With