Re: [SCXML] Inject external event with XML payload () into SCXML engine

2007-07-05 Thread Rahul Akolkar

Please post to the user list if the question is purely about usage
(though I understand determining that can be tricky sometimes). If
this thread continues, we should probably move it to the user list.

On 7/5/07, Ingmar Kliche <[EMAIL PROTECTED]> wrote:

Rahul,

I would like to inject events with XML payload into the SCXML engine.
Currently we have to convert XML represented messages received from external
components into a hashmap object to fire the event into the engine. But this
does not allow to include XML attributes easily. Suppose we have an event
which is represented as an EMMA string, e.g. (borrowed from [1])


  

  Boston
  Denver



  Austin
  Denver

  


How do we pass this into the SCXML engine? My goal is to pass this XML data
into the SCXML data model and operate on the event data using XPath.

Do you have any suggestion?




Might be best to parse the EMMA into its DOM before attaching it to
the payload (say under property 'emma').

Then you can get to it like so:

Data( _eventdata.emma , '/some/xpath' )

You can define expression language functions to do more specialized things.

You can use  to store the payload in the SCXML data model.

-Rahul



- Ingmar.

[1] http://www.w3.org/TR/emma



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[SCXML] Inject external event with XML payload () into SCXML engine

2007-07-05 Thread Ingmar Kliche

Rahul,

I would like to inject events with XML payload into the SCXML engine.
Currently we have to convert XML represented messages received from external
components into a hashmap object to fire the event into the engine. But this
does not allow to include XML attributes easily. Suppose we have an event
which is represented as an EMMA string, e.g. (borrowed from [1])


 
   
 Boston
 Denver
   

   
 Austin
 Denver
   
 


How do we pass this into the SCXML engine? My goal is to pass this XML data
into the SCXML data model and operate on the event data using XPath.

Do you have any suggestion?

- Ingmar.

[1] http://www.w3.org/TR/emma