I created and slightly modified Lockable Door application mentioned in StateMachine presentation by Cliff Hall. Application have 3 states OPENED, CLOSED and LOCKED, makes use of entry, exit guards and also sends CHANGED annoucement(notification) for specific(CLOSED) state. This demo is great for beginners learning PureMVC StateMachine Utility.
Posts tagged ‘StateMachine’
Below you can see what’s happening when transition between states occurs. First your application sends a StateMachine.ACTION Notification that triggers the StateMachine to begin a transition. Any state specific exiting or entering guard(Commands or Mediators) defined for the current and target state are notified. If transition is not cancelled the current state is changed to the target state and any state specific CHANGED annoucement is sent. And finally a generic annoucement of the CHANGED is sent.