Modeling Identifying states & Modeling Validation in State Machine Diagram
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 lik开发者_开发百科e
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"
精彩评论