commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingmar Kliche" <ingmar.kli...@googlemail.com>
Subject Re: [SCXML] Automatic forward of external events to <invoke>'d components ?
Date Sun, 15 Jul 2007 11:50:59 GMT
2007/7/13, Rahul Akolkar <rahul.akolkar@gmail.com>:
>
> On 7/12/07, Ingmar Kliche <ingmar.kliche@googlemail.com> wrote:
> > 2007/7/6, Rahul Akolkar <rahul.akolkar@gmail.com>:
> > >
> > > 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."
> >
> >
> > Makes sense for sub machines!
> >
> > One would expect substates to receive all the same events.
> >
> >
> > I had a look at the implementation of invoke again. It apears that
> external
> > events (i.e. triggerEvents()) are used to feed events into both engines.
> > parentEvents() uses it to feed external events occuring at the parent
> into
> > the child engine and the child engine uses it to feed *.invoke.done into
> the
> > parents engine.
> >
> > But I have missed how the child machine may send events during execution
> to
> > its parent. If you also use external events (i.e. a triggerEvent) to
> send
> > events to the parent, how would you avoid that the same event is
> forwarded
> > again into the invoke'd machine?
> >
> <snip/>
>
> Do we need to avoid it? An event dispatched using <send> (such as your
> example below) would also be received similarly by a child state even
> if it originated there. The invoke'd machine can ignore it.
>
>
> > Also I have not found how events are automatically forwarded from the
> child
> > to the parent. Assume I use a <send event="foo" targettype="scxml"/>
> within
> > the child. This would let an external event occur at the child. Now -
> taking
> > the assumption that an invoke'd child machine behaves like a complex
> state
> > within the parent - I would assume that the external event occuring at
> the
> > child is also fed into the parent.
> >
> <snap/>
>
> Perhaps. The invoke section is greatly underspecified at this moment
> (as is acknowledged on the Commons SCXML site), my hope is that the
> next WD will bring some more clarity.


I agree.

- Ingmar.

-Rahul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message