commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] <send> _eventdata?
Date Wed, 26 Sep 2007 16:20:56 GMT
On 9/26/07, Christopher Giblin <> wrote:
> Hi,
> I am using <send> and would like to send the current event, or a copy
> thereof, to the target. I don't see a way to do this other than defining
> each event field in a <datamodel> and <assign>'ing each event field to its
> respective <data> element and then finally specifying each <data> element
> in <send>'s "namelist" attribute.
> Is it possible - or has it been considered - for <send> semantics to
> support forwarding the current event (ie, _eventdata) without going over
> <datamodel> ?

This could be related to SCXML-54 [1], though its hard to say without
further details.

Note that depending on how long you want the _eventdata to persist
(beyond the processing cycle for the current event) you may need to
persist it via the <datamodel>. However, it is not necessary to do a
"field-by-field" copy since a <data> is not enforced to be an XML
tree. Ofcourse, if it isn't, its no longer possible to use XPath to
identify pieces of the <data>.

The following snippet illustrates how the entire payload of the event
"foo.done" is used in a subsequent <send>'s namelist.

    <!-- Root or composite state datamodel -->
        <data name="payload"/>

    <state id="foo">
        <transition event="foo.done" target="bar">
            <assign name="payload" expr="_eventdata" />

    <state id="bar">
        <transition event="bar.done" target="baz">
            <send ... namelist="payload etc"/>



> Thanks, chris

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

View raw message