diff options
Diffstat (limited to 'apps/samples')
-rw-r--r-- | apps/samples/http2im/http2im.scxml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/apps/samples/http2im/http2im.scxml b/apps/samples/http2im/http2im.scxml new file mode 100644 index 0000000..a2b2090 --- /dev/null +++ b/apps/samples/http2im/http2im.scxml @@ -0,0 +1,49 @@ +<scxml datamodel="ecmascript" name="http2im"> + + <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> + <state id="idle"> + <onentry> + <!-- <send event="dump" delay="100ms" /> --> + </onentry> + + <invoke type="instant-messaging" id="im"> + <param name="username" expr="'uscxml@diogenes.local'" /> + <param name="password" expr="'uscxml'" /> + <param name="protocol" expr="'prpl-jabber'" /> + <finalize> + <script> + print("-----------------\n"); + dump(_event);</script> + </finalize> + </invoke> + + <transition event="http.get"> + <script> + print("-----------------\n"); + dump(_event);</script> + <respond status="200" to="_event.origin" /> + <send target="#_im" event="im.send"> + <param name="receiver" expr="'sradomski@diogenes.local'" /> + <content expr="_event.data.query.msg" /> + </send> + </transition> + + <transition event="im.buddy.status.changed"> + <!-- <script>print("\n\n"); dump(_invokers['im']);</script> --> + </transition> + + <transition event="im.signed.on"> + <!-- <send target="#_im" event="im.buddy.add"> + <param name="name" expr="'sradomski@diogenes.local'" /> + <param name="msg" expr="'Please add me as a contact!'" /> + </send> --> + <!-- <script>print("\n\n"); dump(_invokers['im']);</script> --> + <send target="#_im" event="im.send"> + <param name="receiver" expr="'sradomski@diogenes.local'" /> + <param name="data" expr="someBinaryData" /> <!-- Unsupported :( --> + <content><![CDATA[Have a look <a href="http://www.heise.de">here</a>]]></content> + </send> + </transition> + + </state> +</scxml>
\ No newline at end of file |