test233.txml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0"?>
  2. <!-- test that finalize markup runs before the event is processed. The invoked process will
  3. return 2 in _event.data.aParam, so that new value should be in force when we select
  4. the transtitions. -->
  5. <scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  6. <datamodel>
  7. <data conf:id="1" conf:expr="1"/>
  8. </datamodel>
  9. <state id="s0">
  10. <onentry>
  11. <send event="timeout" delay="3s"/>
  12. </onentry>
  13. <invoke type="http://www.w3.org/TR/scxml/">
  14. <content>
  15. <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  16. <final id="subFinal">
  17. <onentry>
  18. <send target="#_parent" event="childToParent">
  19. <param name="aParam" conf:expr="2"/>
  20. </send>
  21. </onentry>
  22. </final>
  23. </scxml>
  24. </content>
  25. <finalize>
  26. <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
  27. </finalize>
  28. </invoke>
  29. <transition event="childToParent" conf:idVal="1=2" conf:targetpass=""/>
  30. <transition event="*" conf:targetfail=""/>
  31. </state>
  32. <conf:pass/>
  33. <conf:fail/>
  34. </scxml>