Hi Gaurav,
StateMachine.getCurrentRawState() will return ImmutableState instance of current stage which contains all available transition informations, e.g. ImmutableState.getAllTransitions() will return all available transitions start from this state and also ImmutableState.getTransitions(E event) will return all possible transitions triggered by input event.
Moreover, you can also use SCXMLVisitor to export each transition xml definition for further usage, e.g.
<state id="RIGHT">
<transition cond="InBorderCondition" event="MOVE_AHEAD" target="RIGHT">
<raise event="callMethod(SnakeController.onMove)"/>
</transition>
<transition cond="Always" event="TURN_UP" target="UP">
<raise event="callMethod(SnakeController.onChangeDirection)"/>
</transition>
<transition cond="Always" event="TURN_DOWN" target="DOWN">
<raise event="callMethod(SnakeController.onChangeDirection)"/>
</transition>
</state>
Thanks,
Henry
在 2014年10月28日星期二UTC+8下午7时38分49秒,Gaurav Arora写道: