test578.txml 661 B

123456789101112131415161718192021222324
  1. <?xml version="1.0"?>
  2. <!-- in the ECMA data model, test that processor creates an ECMAScript object
  3. _event.data when receiving JSON in an event -->
  4. <scxml xmlns="http://www.w3.org/2005/07/scxml"
  5. xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
  6. <state id="s0">
  7. <onentry>
  8. <send event="foo">
  9. <content>{ "productName" : "bar", "size" : 27 }</content>
  10. </send>
  11. </onentry>
  12. <transition event="foo" cond="_event.data.productName == 'bar'"
  13. conf:targetpass=""/>
  14. <transition event="*" conf:targetfail=""/>
  15. </state>
  16. <conf:pass/>
  17. <conf:fail/>
  18. </scxml>