test347.txml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0"?>
  2. <!-- test that the scxml event I/O processor works by sending events back and forth between an invoked child
  3. and its parent process -->
  4. <scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  5. <state id="s0" initial="s01">
  6. <invoke id="child" type="scxml" >
  7. <content>
  8. <scxml initial="sub0" version="1.0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  9. <state id="sub0">
  10. <onentry>
  11. <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_parent" event="childToParent"/>
  12. </onentry>
  13. <transition event="parentToChild" target="subFinal"/>
  14. </state>
  15. <final id="subFinal"/>
  16. </scxml>
  17. </content>
  18. </invoke>
  19. <onentry>
  20. <send delay="20s" event="timeout"/>
  21. </onentry>
  22. <transition event="timeout" conf:targetfail=""/>
  23. <state id="s01">
  24. <transition event="childToParent" target="s02"/>
  25. </state>
  26. <state id="s02">
  27. <onentry>
  28. <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_child" event="parentToChild"/>
  29. </onentry>
  30. <transition event="done.invoke" conf:targetpass=""/>
  31. <transition event="error" conf:targetfail=""/>
  32. </state>
  33. </state>
  34. <conf:pass/>
  35. <conf:fail/>
  36. </scxml>