after.xml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" ?>
  2. <diagram author="Glenn De Jonghe" name="TestAfter">
  3. <description>
  4. Used for testing the AFTER event.
  5. </description>
  6. <inport name="test_input" />
  7. <outport name="test_output" />
  8. <class name="Class1" default="true">
  9. <scxml name="Test1" initial="composite">
  10. <state id="composite" initial="state_1">
  11. <state id="state_1">
  12. <transition after="0.1" target="../state_2"/>
  13. <transition after="0.2" target="../state_3"/>
  14. </state>
  15. <state id="state_2">
  16. <onentry>
  17. <raise event="in_state_2" port="test_output" />
  18. </onentry>
  19. </state>
  20. <state id="state_3">
  21. <onentry>
  22. <raise event="in_state_3" port="test_output"/>
  23. </onentry>
  24. </state>
  25. </state>
  26. </scxml>
  27. </class>
  28. <test>
  29. <expected>
  30. <slot>
  31. <event name="in_state_2" port="test_output"/>
  32. </slot>
  33. </expected>
  34. </test>
  35. </diagram>