On 7/6/07, Ingmar Kliche <[EMAIL PROTECTED]> wrote:

it seems to me that the current implementation automatically forwards
(external) events to <invoke>'d child state machines (or other components):

see: triggerEvents() of SCXMLExecuter.java

   // 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'" />

   <log expr="'Finalizing ...'" />

 <transition event="foo">
  <send event="foo" target="invokedID" targettype="SCXML"
 <transition event="invoker.invoke.done" target="end" />
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.


[1] http://jakarta.apache.org/commons/scxml/issue-tracking.html


[1] http://www.w3.org/TR/2007/WD-scxml-20070221/#Invoke

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to