States Machines: internal and external transitions in SCXML

TNIxeye

New Member
I'm new to SCXML. I am wondering if I use it adequately.I want to code a simplified mechanism where I have two states A and B. I can ping-pong between these two states. But when I enter the B state, I want to ensure that a subtask1 has been completely performed.I have modeled that this way:\[code\]<scxml> <state id="stateA"> <transition event="eventMoveToB" target="stateB"/> </state> <state id="stateB"> <state id="subTask1"> <transition event="eventsubTask1Finished" target="subTask2" type="internal"/> </state> <state id="subTask2"> <transition event="eventMoveToA" target="stateA" type="external"/> </state></scxml>\[/code\]Is it the correct way ? Or should I use the tags with executable content ?
 
Back
Top