1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<scxml datamodel="ecmascript"> <datamodel> <data id="iterations">100000</data> </datamodel> <state id="start"> <transition target="loop" /> </state> <state id="loop"> <onentry> <script>iterations--;</script> </onentry> <transition cond="iterations > 0" target="start" /> <transition cond="iterations == 0" target="final" /> </state> <final id="final" /> </scxml>