commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: [scxml] Trigger "complicated" events
Date Sat, 21 May 2011 22:48:30 GMT
On Sat, May 21, 2011 at 4:41 PM, Artem Vovk <> wrote:
> Hi,
>        In the document about Authoring Applications for the Multimodal Architecture(,
I have noticed an interesting <transition> tag :
>        <!-- handle GUI input -->
>    <transition event="mmi:extension" cond=" == 'GUI'
> == 'success'" target="echoColor"/>
>       <!-- save color to data model -->
>       <assign location="_data.color" expr=""/>
>    </transition>
> It looks that a data was send with the event and one can access this data with
 . How can I send such events from commons scxml to scxml document?(with method fireEvent(String
event) I can fire only the event name, without data)

When you instantiate the TriggerEvent, use the three argument
constructor to add event payload:,
int, java.lang.Object)

Then, you may refer to the payload Object as _eventdata (in v0.9, in
next release it will change to as the spec now requires).

Here is an example from the test suite that uses event payload to
determine transitions to follow; so you can look up syntax (see parent
directory for more samples, syntax depends on EL in use):


> Cheers,
> Artem

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

View raw message