blob: be7e2ddd6276f44575810c0aa088d65a18086131 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?xml version="1.0" standalone="no"?>
<!-- test that any attempt to change the value of a system variable causes error.execution to be raised.
Event1..4 are there to catch the case where the error event is not raised. In cases where it is, we have
to dispose of eventn in the next state, hence the targetless transitions (which simply throw away the event.) -->
<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" name="machineName" datamodel="lua">
<state id="s0">
<onentry>
<assign expr="'otherName'" location="_sessionid"/>
<raise event="event1"/>
</onentry>
<transition event="error.execution" target="s1"/>
<transition event="*" target="fail"/>
</state>
<state id="s1">
<onentry>
<assign expr="'otherName'" location="_event"/>
<raise event="event2"/>
</onentry>
<!-- throw out event1 if it's still around -->
<transition event="event1"/>
<transition event="error.execution" target="s2"/>
<!-- event1 would trigger this transition if we didn't drop it. We want this transition to have
a very general trigger to catch cases where the wrong error event was raised -->
<transition event="*" target="fail"/>
</state>
<state id="s2">
<onentry>
<assign expr="'otherName'" location="_ioprocessors"/>
<raise event="event3"/>
</onentry>
<transition event="event2"/>
<transition event="error.execution" target="s3"/>
<transition event="*" target="fail"/>
</state>
<state id="s3">
<onentry>
<assign expr="'otherName'" location="_name"/>
<raise event="event4"/>
</onentry>
<transition event="event3"/>
<transition event="error.execution" target="pass"/>
<transition event="*" target="fail"/>
</state>
<final id="pass"/>
<final id="fail"/>
</scxml>
|