W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2014

Invoking on stable configuration but sending on entry

From: Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de>
Date: Mon, 20 Jan 2014 10:15:29 +0000
To: "www-voice@w3.org (www-voice@w3.org)" <www-voice@w3.org>
Message-ID: <36F4C8AB-4AE8-427F-889A-464A7ADC4F61@tk.informatik.tu-darmstadt.de>
Hey there,

as we continue to use SCXML for various applications, there is one deficiency that always bugged us. Consider that you have a state that will invoke something and you’d like to send some event to it right-away. You cannot use <send target=“#_invokeid”> in an onentry element as the invoker will not yet exist, it is only invoked when a stable configuration is reached (see procedure mainEventLoop in the draft). Thus forcing you to use a delay attribute.

<state id=“foo”>
  <invoke type=“something” id=“something” />
  <onentry>
    <!— this will fail as the invoker does not yet exist -->
    <send target=“#_something” event=“do.something” /> 

    <!— this will work as we had an empty internal queue -->
    <send target=“#_something” event=“do.something” delay=“1ms" /> 
  </onentry>
</state>

Is anyone else bugged by this behavior and resorted to the delayed send idiom, is there something more straight-forward or did we misinterpret the SCXML draft at some point?

If this is indeed correct behavior, maybe we could specify that an invoker *must* raise some internal event after being successfully invoked?

Best regards
Stefan
Received on Monday, 20 January 2014 10:15:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:44 UTC