summaryrefslogtreecommitdiffstats
path: root/test/w3c/namespace/test189.scxml
blob: 7f3114954afbd03b0b25044aaecf90071a1189c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8"?>
<!-- we test that #_internal as a target of <send> puts the event on the internal queue.  If it does,
event1 will be processed before event2, because event1 is added to the internal queue while event2 is
added to the external queue (event though event2 is generated first)  -->
<scxml:scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" xmlns:scxml="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="ecmascript">
  <scxml:state id="s0">
    <scxml:onentry>
      <!-- goes to the external queue -->
      <scxml:send event="event2"/>
      <!-- to the internal queue -->
      <scxml:send event="event1" target="#_internal"/>
    </scxml:onentry>
    <!-- once we've entered the state, we should check for internal events first -->
    <scxml:transition event="event1" target="pass"/>
    <scxml:transition event="event2" target="fail"/>
  </scxml:state>
  <scxml:final id="pass">
    <scxml:onentry>
      <scxml:log label="Outcome" expr="'pass'"/>
    </scxml:onentry>
  </scxml:final>
  <scxml:final id="fail">
    <scxml:onentry>
      <scxml:log label="Outcome" expr="'fail'"/>
    </scxml:onentry>
  </scxml:final>
</scxml:scxml>