commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] Help with sending events
Date Fri, 24 Mar 2006 21:01:14 GMT
On 3/24/06, <> wrote:
> Hi,
> I am a graduate student developing a testing tool for an open source software
> framework providing image-guided surgery applications (
> State machines are used to ensure the stability of the components in this
> framework. We are very interested in using SCXML engine for the test suite.

Sounds like a good usecase, thanks for sharing.

> My problem is that, I am having trouble triggering the events in order to make
> transitions. Using the "fireEvent" method I am able to achieve this, but I
> would like to use <send> to send the events. Right now, although the send gets
> called during the scxml execution, the transition does not happen whether I
> call it from the same session or externally.

You are right, this bit is not implemented according to the latest
SCXML working draft. I'll try to make the necessary change over the
weekend; you can also file a ticket in the ASF bugzilla to track this
issue. Details are on the issue tracking page [1].

<send> can be overloaded in as many ways as "targettypes" the user
wishes to support. Looking at the example Mike shared with us, the
engine is sending events and data to an external system (in this case
a browser -- happens to be a speech browser, hence the VoiceXML
markup). For such usages, the events will be processed by suitable
implementations of the EventDispatcher interface from Commons SCXML.
However, in the specific case where (your usage scenario):

 * The <send> targettype is "scxml"

 * The target is not specified or empty (defaults to current execution)

the SCXML WD is clear that it should result in a "derived" event being
triggered on the current state machine. That will soon be the case.
Sorry about the confusion.



> My scxml file looks something like this:
> <?xml version="1.0"?>
> <scxml xmlns=""
>         version="1.0"
>       initialstate="NullImageSpatialObjectState">
>        <state id="NullImageSpatialObjectState">
>                <transition event=" validImageSpatialObjectInput">
>                                <target next="ValidImageSpatialObjectState"/>
>                </transition>
>        </state>
>        ………………………
> </scxml>
> I am using
> <send  targettype="scxml" event="validImageSpatialObjectInput"/> to send the
> validImageSpatialObjectInput event.
> I am a little confused as to how <send> works.
> Any help is appreciated.
> Thank you,
> shylaja

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

View raw message