<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="off" xmlns:sqrl="http://squirrelframework.org/squirrel"> <sqrl:fsm id="Spuhpls9kR" fsm-type="org.gradle.MySecondStateMachine" state-type="java.lang.String" event-type="java.lang.String" context-type="java.lang.Void" context-insensitive="true" /> <state id="S" initial="s1"> <state id="s1" initial="s11"> <onexit> <sqrl:action content="method#onExit" /> </onexit>
<state id="s11"> <onexit> <sqrl:action content="method#onExit" /> </onexit> </state>
<transition event="e" target="s21" sqrl:type="EXTERNAL" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"> <sqrl:action content="method#onTransition" /> </transition>
</state>
<state id="s2" initial="s21"> <onexit> <sqrl:action content="method#onExit" /> </onexit> <state id="s21"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <onexit> <sqrl:action content="method#onExit" /> </onexit> </state> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <transition event="etop" target="S21" sqrl:type="EXTERNAL" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"> <sqrl:action content="method#onTransition" /> </transition> </state>
<parallel id="p"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <transition sqrl:type="EXTERNAL" event="done.state.p" target="someOtherState" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"/>
<state id="S1" initial="S11"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <state id="S11"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <transition sqrl:type="EXTERNAL" event="e4" target="S12" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"/> </state> <state id="S12"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <transition sqrl:type="EXTERNAL" event="e1" target="S1Final" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"/> </state> <final id="S1Final" /> </state>
<state id="S2" initial="S21"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <state id="S21"> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <transition sqrl:type="EXTERNAL" event="e1" target="S12" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"/> </state> <state id="S22"> <transition sqrl:type="EXTERNAL" event="e2" target="S2Final" cond="instance#org.squirrelframework.foundation.fsm.Conditions$Always"/> </state> <final id="S2Final" /> </state>
</parallel> <onentry> <sqrl:action content="method#onEntry" /> </onentry> <onexit> <sqrl:action content="method#onExit" /> </onexit> </state></scxml>
To get current sub states of the parallel state
stateMachine.getSubStatesOn(MyState.Root); // return list of current sub states of parallel state