Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 like

enter image description here

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

enter image description here

like image 485
Jiew Meng Avatar asked Nov 26 '25 02:11

Jiew Meng


1 Answers

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"

like image 54
Frederic Heem Avatar answered Nov 28 '25 16:11

Frederic Heem