commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] Automatic forward of external events to <invoke>'d components ?
Date Fri, 06 Jul 2007 20:42:20 GMT
On 7/6/07, Ingmar Kliche <> wrote:
> Rahul,
> it seems to me that the current implementation automatically forwards
> (external) events to <invoke>'d child state machines (or other components):
> see: triggerEvents() of
>    // Forward events (external only) to any existing invokes,
>    // and finalize processing
>    semantics.processInvokes(evts, errorReporter, scInstance);
> Do I understand this comment correctly? Is this intended? I actually do not
> understand the current SCXML WD in this way [1].

It is my interpretation of, quoted from your reference:

"Note that the <invoke> element may be used to invoke an external
SCXML interpreter to execute a different state machine. In this case,
the external state machine acts as a set of substates of the invoking
state. The behavior is thus similar to a complex state defined with
<state> child elements."

One would expect substates to receive all the same events.

> I would like to have
> control which events to forward to an invoked component at markup level,
> something like:
> <state id="invoker">
>  <invoke targettype="scxml" src="invoked-01.xml">
>   <param name="foo" expr="'foo'" />
>   <param name="bar" expr="'bar'" />
>   <finalize>
>    <log expr="'Finalizing ...'" />
>   </finalize>
>  </invoke>
>  <transition event="foo">
>   <send event="foo" target="invokedID" targettype="SCXML"
> namelist="_eventdata"/>
>  </transition>
>  <transition event="invoker.invoke.done" target="end" />
> </state>
> What do you think?

Makes sense, and should be possible. If you want to track this, please
open a ticket in JIRA [1]. I may not be able to get to it for a couple
of weeks. If you want to take a stab at it, you will have to modify
the execute() method in oacs.model.Send. Currently, the "invokedID" is
effectively the ID of the parent <state>, but that may need to be
revisited as well.



> Regards,
> Ingmar
> [1]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message