summaryrefslogtreecommitdiffstats
path: root/test/w3c/lua/test243.scxml
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c/lua/test243.scxml')
-rw-r--r--test/w3c/lua/test243.scxml33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/w3c/lua/test243.scxml b/test/w3c/lua/test243.scxml
new file mode 100644
index 0000000..7e1f854
--- /dev/null
+++ b/test/w3c/lua/test243.scxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" standalone="no"?>
+<!-- test that datamodel values can be specified by param.
+test240sub1 will return success ifits Var1 is set to 1, failure otherwise. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="lua">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param expr="1" name="testvar1"/>
+ <content>
+ <scxml version="1.0" initial="sub0" datamodel="lua">
+ <datamodel>
+ <data expr="0" id="testvar1"/>
+ </datamodel>
+ <state id="sub0">
+ <transition target="subFinal" cond="testvar1 == 1">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass"/>
+ <final id="fail"/>
+</scxml>