I'm attempting to use StateMachine for the first time and have a question about states and transitions. In the open/close/lock door example I see how it's possible to limit which states are available from the current state. However, in my app, using SWFAddress a user could conceivably go TO any state FROM any state by typing in a direct URL, BUT, it might be necessary to travel through multiple states to get there.
For simplicity sake, lets use an example of an app that moves a box to the 4 corners of your screen, each corner represented by a state. Changing state tweens the box to the correct position, but it only moves horizontally and vertically, in a clockwise fashion. States:
<transition action="TO_TOP_RIGHT" target="TOP_RIGHT" />
<transition action="TO_BOTTOM_RIGHT" target="BOTTOM_RIGHT" >
<transition action="TO_BOTTOM_LEFT" target="BOTTOM_LEFT" >
<transition action="TO_TOP_LEFT" target="TOP_LEFT" />
So the site inits the box at TOP_LEFT and the user types in http://sweetboxapp.com/#/bottomright
. The box needs to move from TOP_LEFT to TOP_RIGHT, then from TOP_RIGHT to BOTTOM_RIGHT, essentially moving through states. While this example is simple, in the app I'm developing a user could move through a maximum of 6 states. It's important (or at least I think it is) to maintain the idea of moving through states because of the transitions that are required. ie. TOP_LEFT can't go to BOTTOM_RIGHT directly, it must move through TOP_RIGHT.
Am I thinking about this correctly?