test338.txml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0"?>
  2. <!-- test that invokeid is set correctly in events received from an invoked process. timeout event catches the
  3. case where the invoke doesn't work correctly -->
  4. <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">
  5. <datamodel>
  6. <data conf:id="1"/>
  7. <data conf:id="2"/>
  8. </datamodel>
  9. <state id="s0">
  10. <onentry>
  11. <send event="timeout" delay="2s"/>
  12. </onentry>
  13. <invoke conf:idlocation="1" type="http://www.w3.org/TR/scxml/" >
  14. <content>
  15. <scxml initial="sub0" version="1.0" conf:datamodel="" name="machineName">
  16. <final id="sub0">
  17. <onentry>
  18. <send target="#_parent" event="event1"/>
  19. </onentry>
  20. </final>
  21. </scxml>
  22. </content>
  23. </invoke>
  24. <transition event="event1" target="s1">
  25. <assign conf:location="2" conf:eventField="invokeid"/>
  26. </transition>
  27. <transition event="event0" conf:targetfail=""/>
  28. </state>
  29. <state id="s1">
  30. <transition conf:VarEqVar="1 2" conf:targetpass=""/>
  31. <transition conf:targetfail=""/>
  32. </state>
  33. <conf:pass/>
  34. <conf:fail/>
  35. </scxml>