summaryrefslogtreecommitdiffstats
path: root/tests/auto/statemachine/multipleinvokableservices.scxml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/statemachine/multipleinvokableservices.scxml')
-rw-r--r--tests/auto/statemachine/multipleinvokableservices.scxml48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/auto/statemachine/multipleinvokableservices.scxml b/tests/auto/statemachine/multipleinvokableservices.scxml
new file mode 100644
index 0000000..8b20695
--- /dev/null
+++ b/tests/auto/statemachine/multipleinvokableservices.scxml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" binding="early" name="MultipleInvokableServices.scxml" datamodel="ecmascript" initial="TopState">
+ <datamodel>
+ <data id="Var"/>
+ </datamodel>
+ <state id="TopState">
+ <state id="State1">
+ <invoke id="invoke1">
+ <content>
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" binding="early" name="anywhere">
+ <state id="foo">
+ <onentry>
+ <send target="#_parent" event="running1"/>
+ </onentry>
+ <transition event="toChild">
+ <send target="#_parent" event="received1"/>
+ </transition>
+ </state>
+ </scxml>
+ </content>
+ </invoke>
+ </state>
+ <state id="State2">
+ <invoke id="invoke2">
+ <content>
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" binding="early" name="anywhere">
+ <state id="foo">
+ <onentry>
+ <send target="#_parent" event="running2"/>
+ </onentry>
+ </state>
+ </scxml>
+ </content>
+ </invoke>
+ </state>
+ <transition event="running1">
+ <send event="toChild" target="#_invoke1"/>
+ </transition>
+ <transition event="received1">
+ <assign location="Var" expr="1"/>
+ <send event="toChild" target="#_invoke2"/>
+ </transition>
+ <transition event="error.communication" cond="Var == 1" target="success"/>
+ <transition event="*" target="failure"/>
+ </state>
+ <final id="success"/>
+ <final id="failure"/>
+</scxml>