diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-08 00:20:56 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-08 00:20:56 (GMT) |
commit | dbd110e2b7eb08c65218a5f9d09ef12fdc62c04a (patch) | |
tree | 93444e4c106eeca34d928521bedbda8080410795 /test/w3c/lua/test533.scxml | |
parent | d5e1f6397c52513018cd59972cf5ca8740de18eb (diff) | |
download | uscxml-dbd110e2b7eb08c65218a5f9d09ef12fdc62c04a.zip uscxml-dbd110e2b7eb08c65218a5f9d09ef12fdc62c04a.tar.gz uscxml-dbd110e2b7eb08c65218a5f9d09ef12fdc62c04a.tar.bz2 |
First signs of Lua Datamodel
Diffstat (limited to 'test/w3c/lua/test533.scxml')
-rw-r--r-- | test/w3c/lua/test533.scxml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/w3c/lua/test533.scxml b/test/w3c/lua/test533.scxml new file mode 100644 index 0000000..6407cfe --- /dev/null +++ b/test/w3c/lua/test533.scxml @@ -0,0 +1,59 @@ +<?xml version="1.0" standalone="no"?> +<!-- test that an internal transition whose source state is not compound does exit its source state --> +<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s1" version="1.0" datamodel="lua"> + <datamodel> + <data expr="0" id="testvar1"/> + <!-- how often we have exited p --> + <data expr="0" id="testvar2"/> + <!-- how often we have exited ps1 --> + <data expr="0" id="testvar3"/> + <!-- how often we have exited ps2 --> + <data expr="0" id="testvar4"/> + <!-- how often the transition for foo has been taken --> + </datamodel> + <state id="s1"> + <onentry> + <raise event="foo"/> + <raise event="bar"/> + </onentry> + <transition target="p"/> + </state> + <parallel id="p"> + <onexit> + <assign location="testvar1" expr="testvar1+1"/> + </onexit> + <transition event="foo" type="internal" target="ps1"> + <assign location="testvar4" expr="testvar4+1"/> + </transition> + <!-- make sure the transition on foo was actually taken --> + <transition event="bar" target="s2" cond="testvar4 == 1"/> + <transition event="bar" target="fail"/> + <state id="ps1"> + <onexit> + <assign location="testvar2" expr="testvar2+1"/> + </onexit> + </state> + <state id="ps2"> + <onexit> + <assign location="testvar3" expr="testvar3+1"/> + </onexit> + </state> + </parallel> + <state id="s2"> + <!-- make sure that p was exited twice --> + <transition target="s3" cond="testvar1 == 2"/> + <transition target="fail"/> + </state> + <state id="s3"> + <!-- make sure that ps1 was exited twice --> + <transition target="s4" cond="testvar2 == 2"/> + <transition target="fail"/> + </state> + <state id="s4"> + <!-- make sure that ps2 was exited twice --> + <transition cond="testvar3 == 2" target="pass"/> + <transition target="fail"/> + </state> + <final id="pass"/> + <final id="fail"/> +</scxml> |