On 4/3/06, Rahul Akolkar <[EMAIL PROTECTED]> wrote:
> On 4/2/06, Fasih <[EMAIL PROTECTED]> wrote:
<snip/>
>
> The latest SCXML WD also specifies that the special variable
> "_eventdata" may be used to access data contained within the
> triggering event (i.e. the payload). Thus, along the lines of the
> above example, a transition may look like:
>
> <transition event="connection.alerting"
> cond="_eventdata.line eq 1"
> target="..." />
>
> where the event payload defines a "line" property. This bit (exposing
> payload as "_eventdata") hasn't been done for Commons SCXML yet, but
> I'll do it now. Will ping this thread when am done.
>
<snap/>
Ping, "_eventdata" should be available in 20060404 nightlies here [1].
Here [2] is a sample based on your snippet, also illustrates using a
user-defined payload ("_eventdata.line" in the expressions under
state2 refers to line property of user-defined payload type [3]).
-Rahul
(long, possibly fragmented, URLs below)
[1] http://cvs.apache.org/builds/jakarta-commons/nightly/commons-scxml/
[2]
http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-02.xml?view=markup
[3]
http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/EventDataTest.java?view=markup
(see ConnectionAlertingPayload type towards end of file)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]