PureMVC StateMachine Utility

Well, finally my StateMachine utility is officially hosted on the pureMVC Manifold… download it here.

Its quite different than the original in a number of ways:

1) the utility conforms to the basic SCXML standard, and comes with a FSMInjector class that creates the StateMachine from an SCXML defined model.

2) the transitions from state to state are no longer purely linear; multiple legitimate target states can be defined within each state, so the transitions can be dynamically decided at run time.

3) the StateMachine class now only sends notifications, it doesn’t execute registered commands directly. This means that other actors (ie Mediators) can declare an interest in them.

4) transitions can be cancelled from the exiting phase.

When I’ve a little more time I shall write a more in depth tutorial. But for the moment, have a play, and see what you think…

cheers :~)

4 thoughts on “PureMVC StateMachine Utility

  1. Pingback: » Blog Archive » pureMVC simple StateMachine utility

  2. SCXML-inspired would be a better way to put it. Why wasn’t SCXML itself used?

    Several reasons:

    * Much more complex than we wanted to attempt.
    * Conditional logic is ugly because you have to escape ampersands in xml.
    * We wanted entering and exiting notifications for each state.
    * The word ‘event’ would inevitably cause confusion to the Flash community, so we chose ‘action’.

    -=Cliff>

Leave a Reply

Your email address will not be published. Required fields are marked *