blob: 5e6d4363d6a21617fde7f2bd60c19290db8ef5a3 (
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" standalone="no"?>
<!-- test that the first clause that evaluates to true - and only that clause - is executed.
Only one event should be raised, and it should be bar -->
<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="lua">
<datamodel>
<data expr="0" id="testvar1"/>
</datamodel>
<state id="s0">
<onentry>
<if cond="false">
<raise event="foo"/>
<assign location="testvar1" expr="testvar1+1"/>
<elseif cond="true"/>
<raise event="bar"/>
<assign location="testvar1" expr="testvar1+1"/>
<else/>
<raise event="baz"/>
<assign location="testvar1" expr="testvar1+1"/>
</if>
<raise event="bat"/>
</onentry>
<transition event="bar" cond="testvar1 == 1" target="pass"/>
<transition event="*" target="fail"/>
</state>
<final id="pass"/>
<final id="fail"/>
</scxml>
|