summaryrefslogtreecommitdiffstats
path: root/test/w3c/namespace/test401.scxml
blob: bea732bd5965635aeb764283a8b33f3453a8f84d (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
<?xml version="1.0" encoding="UTF-8"?>
<!-- test that errors go in the internal event queue.  We send ourselves an external event foo, then perform
and operation that raises an error. Then check that the error event is processed first, even though
it was raised second  -->
<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>
      <scxml:send event="foo"/>
      <!-- assigning to a non-existent location should raise an error -->
      <scxml:assign location="foo.bar.baz " expr="2"/>
    </scxml:onentry>
    <scxml:transition event="foo" target="fail"/>
    <scxml:transition event="error" target="pass"/>
  </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>