commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslav Pullmann <jaroslav.pullm...@fit.fraunhofer.de>
Subject Re: [SCXML] targetless transitions / event handling / accessing event payload
Date Tue, 30 Dec 2008 11:53:37 GMT

  Thank you Raul, using _eventdatamap did help. I'd like to summarize the proposed solutions
  (with JEXL as expression language), please correct them when necessary:

   1) access the simple string content of thze event payload  ?

     <transition event="view" cond="_eventdatamap['view'].text != null">

   2) access XML event payload  via XPath ?

     <transition event="event.bar" cond="Data(_eventdatamap['event.bar'].rootdata,'root/one')
== 1"/>

   3) send a subtree of an XML data model along with an event ?

     - first define a local variable holding the required data excerpt via the custom action
"cs:var"
       where xmlns:cs="http://commons.apache.org/scxml", since <datamodel> is valid
only in context
       of <state>, not within an executable content:

	<cs:var name="text" expr="Data(xmltext,'text')"/>

     - reference the variable via @namelist like an ordinary datamodel part:

         <send event="'view'" namelist="text" />


  Best regards ... and a happy New Year ;o)
     Jaro

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message