commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armel SORO <>
Subject [SCXML] Parent and child engines
Date Fri, 06 Mar 2009 10:11:01 GMT

Since I am new to SCXML, I have some questions to ask:
First, is it possible to automatically trigger an event from a derived
engine to a main engine?
Secondly, how can we handle "unexpected" events (events not taken into
account) in a given state machine?

Any answer to the questions above would be appreciated to deal with the
following case:
I have a main engine that is responsible for managing a given SCXML
document. A new engine is instantiated each time an external activity is
invoked in this document.
For example, the main SCXML document looks like this:

<scxml ...>
   <state id="test1">
       <invoke src="SRC" targettype="scxml">
          <param name="param1" expr="'value1'"/>
       <transition event="SRC.invoke.done" target="test2"/>
   <state id="test2">
   . ..

So, invoking the external activity "SRC" causes the main engine to
instantiate and launch a derived engine that has the state machine below:

<scxml ...>
  <state id="invokedActivity"/>
     <invoke src="WebSRC" targettype="web">
       <param name="textToDisplay" expr="param1"/>
   <transition event="WebSRC.invoke.done" target="invocationDone"/>

 <final id="invocationDone">
   <event name="SRC.invoke.done"/>

What I want is that once this derived engine is triggered the event
"WebSRC.invoke.done", it raises the event "SRC.invoke.done" to the main
engine. I also want the derived engine to forward "unexpected" events to its
parent engine.

Thanks in advance for ideas!

Armel SORO

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