summaryrefslogtreecommitdiffstats
path: root/test/issues/test-issue68.scxml
blob: 82d83179fe7c6b50d39a1905cfc0d5b6833f2bd4 (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
<!-- Assertion in case of reusing send id  -->
<scxml datamodel="lua" initial="work" name="root" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
    <datamodel>
        <data expr="0" id="testvar1"/>
    </datamodel>
    <state id="work" initial="act1">
        <transition event="OnTimer" target="fail"/>
        <transition cond="testvar1&gt;3" target="pass"/>
        <state id="act1">
            <onentry>
                <send delay="3000ms" event="OnTimer" id="ID_OnTimer"/>
                <send delay="3000ms" event="OnTimer" id="ID_OnTimer"/>
                <send delay="300ms" event="OnDone"/>
                <assign expr="testvar1 + 1" location="testvar1"/>
                <log expr="testvar1" />
            </onentry>
            <onexit>
                <cancel sendid="ID_OnTimer"/>
            </onexit>
            <transition event="OnDone" target="act2"/>
        </state>
        <state id="act2">
            <onentry>
                <send delay="100ms" event="Back"/>
            </onentry>
            <transition event="Back" target="act1"/>
        </state>
    </state>
    <final id="fail"/>
    <final id="pass"/>
</scxml>