summaryrefslogtreecommitdiffstats
path: root/test/w3c/namespace/test421.scxml
blob: a76ac37d1a7a15cec0c812b096e83c45d6c8bc65 (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
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<!-- test that internal events take priority over external ones, and that the processor
keeps pulling off internal events until it finds one that triggers a transition -->
<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" version="1.0" initial="s1" datamodel="ecmascript">
  <scxml:state id="s1" initial="s11">
    <scxml:onentry>
      <scxml:send event="externalEvent"/>
      <scxml:raise event="internalEvent1"/>
      <scxml:raise event="internalEvent2"/>
      <scxml:raise event="internalEvent3"/>
      <scxml:raise event="internalEvent4"/>
    </scxml:onentry>
    <scxml:transition event="externalEvent" target="fail"/>
    <scxml:state id="s11">
      <scxml:transition event="internalEvent3" target="s12"/>
    </scxml:state>
    <scxml:state id="s12">
      <scxml:transition event="internalEvent4" target="pass"/>
    </scxml:state>
  </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>