diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-11-07 22:20:09 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-11-07 22:20:09 (GMT) |
commit | da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25 (patch) | |
tree | b285148ab6ca415814d9370148f91736f83c852c /test/samples/uscxml/test-umundo-rpc.scxml | |
parent | 0ae6c27d9322208053033d9b19c0ffffed3d99eb (diff) | |
download | uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.zip uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.gz uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.bz2 |
Committing local version again
Diffstat (limited to 'test/samples/uscxml/test-umundo-rpc.scxml')
-rw-r--r-- | test/samples/uscxml/test-umundo-rpc.scxml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/samples/uscxml/test-umundo-rpc.scxml b/test/samples/uscxml/test-umundo-rpc.scxml new file mode 100644 index 0000000..f6e0f70 --- /dev/null +++ b/test/samples/uscxml/test-umundo-rpc.scxml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<scxml datamodel="ecmascript"> + <script> + function dump(thingy) { + if (typeof(thingy) == 'object') { + for (var key in thingy) { + print(key + ": ") + dump(thingy[key]); + } + } else { + print(thingy + "\n"); + } + }; + </script> + <state id="start"> + <!-- Invoke umundo with a service query --> + <invoke type="umundo" id="umundo.eventSvc"> + <param name="types" expr="'proto'"/> + <param name="service" expr="'EchoService'"/> + <finalize> + <log expr="'Calling finalize on returned event'"/> + </finalize> + </invoke> + <state id="idle"> + <transition target="service.added" event="umundo.eventSvc.added"/> + <transition target="service.removed" event="umundo.eventSvc.removed"/> + <transition target="service.reply" event="umundo.eventSvc.reply.echo"/> + </state> + <state id="service.reply"> + <onentry> + <log expr="'RPC Reply:'"/> + <script>dump(_event);</script> + </onentry> + <transition target="idle"/> + </state> + + <state id="service.added"> + <onentry> + <log expr="'Log Service found:'"/> + <script>dump(_event);</script> + <send target="#_umundo.eventSvc" event="echo"> + <param name="type" expr="'EchoRequest'"/> + <content> + ({ + "name": "This is foo!" + }) + </content> + </send> + </onentry> + <transition target="idle"/> + </state> + <state id="service.removed"> + <onentry> + <log expr="'Log Service lost:'"/> + <script>dump(_event);</script> + </onentry> + <transition target="idle"/> + </state> + </state> +</scxml> |