server.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <diagram author="Yentl Van Tendeloo" name="broken">
  3. <description>
  4. Broken!
  5. </description>
  6. <class name="A" default="true">
  7. <relationships>
  8. <association name="child" class="B" min="0" max="1"/>
  9. </relationships>
  10. <scxml initial="x">
  11. <state id="x">
  12. <onentry>
  13. <raise scope="cd" event="create_instance">
  14. <parameter expr="'child'"/>
  15. <parameter expr="'B'"/>
  16. </raise>
  17. </onentry>
  18. <transition event="instance_created" target="../ready">
  19. <parameter name="instancename"/>
  20. <script>
  21. self.instancename = instancename
  22. print(self.instancename)
  23. </script>
  24. </transition>
  25. </state>
  26. <state id="ready">
  27. <onentry>
  28. <raise scope="cd" event="start_instance">
  29. <parameter expr="self.instancename"/>
  30. </raise>
  31. </onentry>
  32. <transition event="close" target="../done">
  33. <script>
  34. print("CLOSED")
  35. </script>
  36. <raise scope="cd" event="delete_instance">
  37. <parameter expr="self.instancename"/>
  38. </raise>
  39. </transition>
  40. </state>
  41. <state id="done"/>
  42. </scxml>
  43. </class>
  44. <class name="B">
  45. <constructor>
  46. <body>
  47. print("READY")
  48. </body>
  49. </constructor>
  50. <relationships>
  51. <association name="parent" class="A" min="1" max="1"/>
  52. </relationships>
  53. <scxml initial="z">
  54. <state id="z">
  55. <onentry>
  56. <script>
  57. print("RUN")
  58. </script>
  59. </onentry>
  60. <transition after="0" target=".">
  61. <script>
  62. print("RAISE")
  63. </script>
  64. <raise scope="broad" event="close"/>
  65. </transition>
  66. </state>
  67. </scxml>
  68. </class>
  69. </diagram>