Просмотр исходного кода

Changed event based execution behavior to passive variant by default.
Updated test cases.

markus.muehlbrandt@itemis.de 14 лет назад
Родитель
Сommit
e6afc29f48
89 измененных файлов с 2368 добавлено и 559 удалено
  1. 8 1
      TestScenarios/GenModelJava.sgen
  2. 29 0
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceEventBasedImpl.java
  3. 5 4
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceImpl.java
  4. 21 0
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IDefaultInterfaceImpl.java
  5. 15 0
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IInterfacePedestrianImpl.java
  6. 15 0
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IInterfaceTrafficLightImpl.java
  7. 4 1
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java
  8. 4 1
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java
  9. 3 3
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCycleBasedStatemachine.java
  10. 18 0
      examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java
  11. 0 4
      examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemoEventBased.java
  12. 13 9
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt
  13. 63 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomEventBasedInterfaceImpl.xpt
  14. 51 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomEventBasedStatemachine.xpt
  15. 46 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomIInterfaceImpl.xpt
  16. 35 12
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomInterfaceImpl.xpt
  17. 3 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/ExecutionModelExtensions.ext
  18. 5 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Main.xpt
  19. 4 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Naming.ext
  20. 44 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceEventBasedImpl.java
  21. 11 7
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceImpl.java
  22. 21 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IDefaultInterfaceImpl.java
  23. 21 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IInterfaceOtherImpl.java
  24. 21 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IInterfaceThirdImpl.java
  25. 44 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherEventBasedImpl.java
  26. 10 6
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherImpl.java
  27. 14 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java
  28. 7 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestEventBasedStatemachine.java
  29. 44 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdEventBasedImpl.java
  30. 10 6
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdImpl.java
  31. 3 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterface.java
  32. 72 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceEventBasedImpl.java
  33. 57 30
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceImpl.java
  34. 35 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/IDefaultInterfaceImpl.java
  35. 105 7
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java
  36. 3 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryEventBasedStatemachine.java
  37. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterface.java
  38. 48 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceEventBasedImpl.java
  39. 75 26
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceImpl.java
  40. 24 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IDefaultInterfaceImpl.java
  41. 10 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IDefaultIterfaceImpl.java
  42. 15 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IInterfaceOtherImpl.java
  43. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOther.java
  44. 42 10
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOtherImpl.java
  45. 27 12
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java
  46. 3 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionEventBasedStatemachine.java
  47. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterface.java
  48. 100 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceEventBasedImpl.java
  49. 87 57
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceImpl.java
  50. 49 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/IDefaultInterfaceImpl.java
  51. 23 7
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java
  52. 3 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyEventBasedStatemachine.java
  53. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterface.java
  54. 52 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceEventBasedImpl.java
  55. 66 24
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceImpl.java
  56. 25 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/IDefaultInterfaceImpl.java
  57. 20 6
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java
  58. 10 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsEventBasedStatemachine.java
  59. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterface.java
  60. 92 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceEventBasedImpl.java
  61. 83 51
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceImpl.java
  62. 45 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/IDefaultInterfaceImpl.java
  63. 22 8
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java
  64. 3 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsEventBasedStatemachine.java
  65. 3 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterface.java
  66. 68 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceEventBasedImpl.java
  67. 55 27
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceImpl.java
  68. 33 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/IDefaultInterfaceImpl.java
  69. 69 7
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java
  70. 3 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryEventBasedStatemachine.java
  71. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterface.java
  72. 48 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceEventBasedImpl.java
  73. 64 17
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceImpl.java
  74. 24 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/IDefaultInterfaceImpl.java
  75. 28 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/IInterfaceAImpl.java
  76. 5 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceA.java
  77. 56 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAEventBasedImpl.java
  78. 54 17
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAImpl.java
  79. 23 10
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java
  80. 11 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionEventBasedStatemachine.java
  81. 1 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryCycleBasedStatemachine.java
  82. 1 12
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryEventBasedStatemachine.java
  83. 0 44
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionEventBasedStatemachine.java
  84. 0 31
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyEventBasedStatemachine.java
  85. 0 28
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java
  86. 0 15
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java
  87. 3 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java
  88. 0 24
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsEventBasedStatemachine.java
  89. 1 15
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryEventBasedStatemachine.java

+ 8 - 1
TestScenarios/GenModelJava.sgen

@@ -25,7 +25,7 @@ http://www.eclipse.org/legal/epl-v10.html
 Contributors:
 	committers of YAKINDU - initial API and implementation
 "
-		}
+		 }
 	}
 	statechart Test_DeepHistory {
 		feature Outlet {
@@ -38,6 +38,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -66,6 +67,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -94,6 +96,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -122,6 +125,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -150,6 +154,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -187,6 +192,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}
 		
 		feature licenseHeader {
@@ -215,6 +221,7 @@ Contributors:
 			InterfaceObserverSupport = true
 			TimerService = true
 			RuntimeService = true
+			GenericInterfaceSupport = true
 		}	
 		
 		feature licenseHeader {

+ 29 - 0
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,29 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			TrafficLightWaitingCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseKeypress1() {
+		super.raiseKeypress1();
+		statemachine.runCycle();
+	}
+	public void raiseKeypress2() {
+		super.raiseKeypress2();
+		statemachine.runCycle();
+	}
+
+}

+ 5 - 4
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/DefaultInterfaceImpl.java

@@ -12,16 +12,17 @@ package org.yakindu.sct.runtime.java.trafficlightwaiting;
 
 import org.yakindu.sct.runtime.java.Event;
 
-public class DefaultInterfaceImpl implements DefaultInterface {
-	private final Event<Events> EventKeypress1 = new Event<Events>(
+public class DefaultInterfaceImpl implements IDefaultInterfaceImpl {
+	protected final Event<Events> EventKeypress1 = new Event<Events>(
 			Events.Keypress1, 0);
-	private final Event<Events> EventKeypress2 = new Event<Events>(
+	protected final Event<Events> EventKeypress2 = new Event<Events>(
 			Events.Keypress2, 0);
 
-	private TrafficLightWaitingCycleBasedStatemachine statemachine;
+	protected TrafficLightWaitingCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			TrafficLightWaitingCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
 	}
 

+ 21 - 0
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IDefaultInterfaceImpl.java

@@ -0,0 +1,21 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventKeypress1();
+
+	public Event<Events> getEventKeypress2();
+
+}

+ 15 - 0
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IInterfacePedestrianImpl.java

@@ -0,0 +1,15 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+public interface IInterfacePedestrianImpl extends InterfacePedestrian {
+
+}

+ 15 - 0
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/IInterfaceTrafficLightImpl.java

@@ -0,0 +1,15 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+public interface IInterfaceTrafficLightImpl extends InterfaceTrafficLight {
+
+}

+ 4 - 1
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java

@@ -10,7 +10,10 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.trafficlightwaiting;
 
-public class InterfacePedestrianImpl implements InterfacePedestrian {
+public class InterfacePedestrianImpl implements IInterfacePedestrianImpl {
+
+	public InterfacePedestrianImpl() {
+	}
 
 	private boolean varRequest;
 	public boolean getVarRequest() {

+ 4 - 1
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java

@@ -10,7 +10,10 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.trafficlightwaiting;
 
-public class InterfaceTrafficLightImpl implements InterfaceTrafficLight {
+public class InterfaceTrafficLightImpl implements IInterfaceTrafficLightImpl {
+
+	public InterfaceTrafficLightImpl() {
+	}
 
 	private boolean varRed;
 	public boolean getVarRed() {

+ 3 - 3
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCycleBasedStatemachine.java

@@ -140,21 +140,21 @@ public class TrafficLightWaitingCycleBasedStatemachine
 		return interfaceTrafficLight;
 	}
 
-	private InterfaceTrafficLightImpl getInterfaceTrafficLightImpl() {
+	protected IInterfaceTrafficLightImpl getInterfaceTrafficLightImpl() {
 		return interfaceTrafficLight;
 	}
 	public InterfacePedestrian getInterfacePedestrian() {
 		return interfacePedestrian;
 	}
 
-	private InterfacePedestrianImpl getInterfacePedestrianImpl() {
+	protected IInterfacePedestrianImpl getInterfacePedestrianImpl() {
 		return interfacePedestrian;
 	}
 	public DefaultInterface getDefaultInterface() {
 		return defaultInterface;
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
 		return defaultInterface;
 	}
 

+ 18 - 0
examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java

@@ -14,14 +14,32 @@ import java.util.LinkedList;
 
 import org.yakindu.sct.runtime.java.Event;
 
+import org.yakindu.sct.runtime.java.Notification;
+
 public class TrafficLightWaitingEventBasedStatemachine
 		extends
 			TrafficLightWaitingCycleBasedStatemachine {
 
 	private LinkedList<Event<? extends Enum<?>>> eventQueue;
 
+	private DefaultInterfaceEventBasedImpl defaultInterface;
+
 	public TrafficLightWaitingEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		defaultInterface = new DefaultInterfaceEventBasedImpl(this);
+	}
+
+	public DefaultInterface getDefaultInterface() {
+		return defaultInterface;
+	}
+
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return defaultInterface;
+	}
+
+	public void notify(Notification notification) {
+		super.notify(notification);
+		runCycle();
 	}
 
 	@Override

+ 0 - 4
examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemoEventBased.java

@@ -31,7 +31,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.TimerService;
 import org.yakindu.sct.runtime.java.trafficlightwaiting.TrafficLightWaitingCycleBasedStatemachine;
 import org.yakindu.sct.runtime.java.trafficlightwaiting.TrafficLightWaitingEventBasedStatemachine;
@@ -68,8 +67,6 @@ public class CrossingDemoEventBased {
 
 		statemachine.setTimerService(new TimerService());
 		statemachine.enter();
-		RuntimeService runtimeService = new RuntimeService(100);
-		runtimeService.addStatemachine(statemachine);
 
 		shell.open();
 		while (!shell.isDisposed()) {
@@ -88,7 +85,6 @@ public class CrossingDemoEventBased {
 				display.sleep();
 			}
 		}
-		runtimeService.cancel();
 		statemachine.getTimerService().cancel();
 	}
 

+ 13 - 9
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt

@@ -279,7 +279,7 @@ public class 
 	};
 	
 	«IF entry.createGenericInterfaceSupport()-»
-		private Map<String,IGenericAccessInterface> interfaceMap;
+		protected Map<String,IGenericAccessInterface> interfaceMap;
 	«ELSE-»
 		«FOREACH scopes.typeSelect(InterfaceScope) AS interface-»
 		private «interface.getInterfaceImplName()» «interface.getInterfaceName().toFirstLower()»;
@@ -362,12 +362,6 @@ public class 
 		return false;
 	}
 	
-	«IF entry.createGenericInterfaceSupport()-»
-	public IGenericAccessInterface getInterface(String name) {
-		return interfaceMap.get(name);
-	}
-	«ENDIF-»
-	
 	«IF isTimedStatemachine()-»
 	public void setTimerService(ITimerService timerService) {
 		this.timerService = timerService;
@@ -389,6 +383,16 @@ public class 
 	}
 	«ENDIF-»
 	
+	«IF entry.createGenericInterfaceSupport()-»
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+	
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+	«ENDIF-»
+	
 	«FOREACH scopes.typeSelect(InterfaceScope) AS interface-»
 	public «interface.getInterfaceName()» get«interface.getInterfaceName()»() {
 		«IF entry.createGenericInterfaceSupport()-»
@@ -399,9 +403,9 @@ public class 
 	}
 	
 	
-	private «interface.getInterfaceImplName()» get«interface.getInterfaceImplName()»() {
+	protected «interface.getIInterfaceImplName()» get«interface.getInterfaceImplName()»() {
 		«IF entry.createGenericInterfaceSupport()-»
-		return («interface.getInterfaceImplName()») getInterface("«interface.getInterfaceName()»");
+		return («interface.getIInterfaceImplName()») getInterface("«interface.getInterfaceName()»");
 		«ELSE-»
 		return «interface.getInterfaceName().toFirstLower()»;
 		«ENDIF-»

+ 63 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomEventBasedInterfaceImpl.xpt

@@ -0,0 +1,63 @@
+«REM»
+Copyright (c) 2011 committers of YAKINDU and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+Contributors:
+	Markus Muehlbrandt - Initial contribution and API
+«ENDREM»
+«IMPORT stext»
+«IMPORT types»
+
+«EXTENSION org::yakindu::sct::generator::java::templates::ExecutionModelExtensions»
+«EXTENSION org::yakindu::sct::generator::java::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::java::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::java::templates::GenmodelEntries»
+«EXTENSION org::yakindu::sct::generator::java::templates::Naming»
+
+«DEFINE file(sgen::GeneratorEntry entry) FOR InterfaceScope»
+«FILE getImplementationPackagePath(entry)+"/"+getEventBasedInterfaceImplName() + '.java'-»
+«getLicenseHeader(entry)»
+package «getImplementationPackageName(entry)»;
+
+public class «getEventBasedInterfaceImplName()» extends «getInterfaceImplName()» {
+			
+	public «getEventBasedInterfaceImplName()»(«getCycleBasedStatemachineName()» statemachine) {
+		super(statemachine);
+	}
+		
+	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
+		«IF !event.type.isVoid()-»
+		public void raise«event.name.toFirstUpper()»(«event.type.getJavaType()» value) {
+			super.raise«event.name.toFirstUpper()»(value);
+			statemachine.runCycle();
+		}
+		«ELSE-»
+		public void raise«event.name.toFirstUpper()»() {
+			super.raise«event.name.toFirstUpper()»();
+		statemachine.runCycle();
+		}
+		«ENDIF-»
+	«ENDFOREACH-»
+	
+	«IF entry.createGenericInterfaceSupport()-»
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+	
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+	«ENDIF-»
+}
+«ENDFILE-»
+«ENDDEFINE»

+ 51 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomEventBasedStatemachine.xpt

@@ -8,7 +8,10 @@ Contributors:
 	Markus Muehlbrandt - Initial contribution and API
 «ENDREM»
 «IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
+«EXTENSION org::yakindu::sct::generator::java::templates::ExecutionModelExtensions»
 «EXTENSION org::yakindu::sct::generator::java::templates::GenmodelEntries»
 «EXTENSION org::yakindu::sct::generator::java::templates::Naming»
 
@@ -21,13 +24,60 @@ import java.util.LinkedList;
 
 import «entry.getBasePackageName()».Event;
 
+«IF isTimedStatemachine()-»
+	import «entry.getBasePackageName()».Notification;
+«ENDIF-»
+
 public class «getEventBasedStatemachineName()» extends «getCycleBasedStatemachineName()» {
 
 	private LinkedList<Event<? extends Enum<?>>> eventQueue;
-
+	
+	«IF !entry.createGenericInterfaceSupport()-»
+		«FOREACH scopes.typeSelect(InterfaceScope) AS interface-»
+			«IF interface.hasIncomingEvents()-»
+			private «interface.getEventBasedInterfaceImplName()» «interface.getInterfaceName().toFirstLower()»;
+			«ENDIF-»
+		«ENDFOREACH-»
+	«ENDIF-»
+	
 	public «getEventBasedStatemachineName()»() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		«IF entry.createGenericInterfaceSupport()-»
+			//Replace interface map entries of cycle based statemachine super class
+			«FOREACH getInterfaceScope() AS interface-»
+				«IF interface.hasIncomingEvents()-»
+				getInterfaceMap().put("«interface.getInterfaceName()»", new «interface.getEventBasedInterfaceImplName()»(«interface.getInterfaceParameter()»));
+				«ENDIF-»
+			«ENDFOREACH-»
+		«ELSE-»
+			«FOREACH getInterfaceScope() AS interface-»
+				«IF interface.hasIncomingEvents()-»
+				«interface.getInterfaceName().toFirstLower()» = new «interface.getEventBasedInterfaceImplName()»(«interface.getInterfaceParameter()»);
+				«ENDIF-»		
+			«ENDFOREACH-»
+		«ENDIF-»
+	}
+	
+	«IF !entry.createGenericInterfaceSupport()-»
+		«FOREACH scopes.typeSelect(InterfaceScope) AS interface-»
+		«IF interface.hasIncomingEvents()-»
+		public «interface.getInterfaceName()» get«interface.getInterfaceName()»() {
+			return «interface.getInterfaceName().toFirstLower()»;
+		}
+		
+		protected «interface.getIInterfaceImplName()» get«interface.getInterfaceImplName()»() {
+			return «interface.getInterfaceName().toFirstLower()»;
+		}
+		«ENDIF-»
+		«ENDFOREACH-»
+	«ENDIF-»
+	
+	«IF isTimedStatemachine()-»	
+	public void notify(Notification notification) {
+		super.notify(notification);
+		runCycle();
 	}
+	«ENDIF-»
 	
 	@Override
 	protected LinkedList<Event<? extends Enum<?>>> getOccuredEvents() {

+ 46 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomIInterfaceImpl.xpt

@@ -0,0 +1,46 @@
+«REM»
+Copyright (c) 2011 committers of YAKINDU and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+Contributors:
+	Markus Muehlbrandt - Initial contribution and API
+«ENDREM»
+«IMPORT stext»
+«IMPORT types»
+
+«EXTENSION org::yakindu::sct::generator::java::templates::ExecutionModelExtensions»
+«EXTENSION org::yakindu::sct::generator::java::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::java::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::java::templates::GenmodelEntries»
+«EXTENSION org::yakindu::sct::generator::java::templates::Naming»
+
+«DEFINE file(sgen::GeneratorEntry entry) FOR InterfaceScope»
+«FILE getImplementationPackagePath(entry)+"/"+getIInterfaceImplName() + '.java'-»
+«getLicenseHeader(entry)»
+package «getImplementationPackageName(entry)»;
+
+«IF hasUnvaluedEvents()-»
+import «entry.getBasePackageName()».Event;
+«ENDIF-»
+«IF hasIncomingValuedEvents()-»
+import «entry.getBasePackageName()».ValuedEvent;
+«ENDIF-»
+
+public interface «getIInterfaceImplName()» extends «getInterfaceName()» {
+		
+	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
+	«IF event.direction == Direction::OUT-»
+		«IF !event.type.isVoid()-»
+		public void raise«event.name.toFirstUpper()»(«event.type.getJavaType()» value);
+		«ELSE»
+		public void raise«event.name.toFirstUpper()»();
+		«ENDIF-»
+	«ELSE-»
+		public «event.getEventType()» «event.getter()»;
+	«ENDIF»
+	«ENDFOREACH»
+}
+«ENDFILE-»
+«ENDDEFINE»

+ 35 - 12
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomInterfaceImpl.xpt

@@ -41,37 +41,48 @@ import 
 import «entry.getBasePackageName()».ValuedEvent;
 «ENDIF-»
 
-public class «getInterfaceImplName()»«getInterfaceImplExtension(entry)» implements «getInterfaceName()» {
+public class «getInterfaceImplName()»«getInterfaceImplExtension(entry)» implements «getIInterfaceImplName()» {
 	«IF entry.createGenericInterfaceSupport()-»
-		private Map<String,Object> variableMap;
+		«IF hasVariables()-»
+		protected Map<String,Object> variableMap;
+		«ENDIF-»
 		«IF hasOutgoingEvents()-»
-		private Map<String, Event<Events>> outEventMap;
+		protected Map<String, Event<Events>> outEventMap;
 		«ENDIF-»
 		«IF hasIncomingEvents()-»
-		private Map<String, Event<Events>> inEventMap;
+		protected Map<String, Event<Events>> inEventMap;
 		«ENDIF-»
 	«ELSE-»
 		«FOREACH declarations.typeSelect(EventDefinition) AS event-»
-		private final «event.getEventType()» «event.getName()» = new «event.getEventType()»(«event.getCreationSignature()»);
+		protected final «event.getEventType()» «event.getName()» = new «event.getEventType()»(«event.getCreationSignature()»);
 		«ENDFOREACH-»
 	«ENDIF-» 
 	
 	«IF hasEvents()-»
-		private «getCycleBasedStatemachineName()-» statemachine;
+		protected «getCycleBasedStatemachineName()-» statemachine;
 		
 		public «getInterfaceImplName()»(«getCycleBasedStatemachineName()» statemachine) {
-		this.statemachine = statemachine;
+			
+			this.statemachine = statemachine;
+	«ELSE-»
+		public «getInterfaceImplName()»() {
+	«ENDIF-»
 		«IF entry.createGenericInterfaceSupport()-»
+			«IF hasVariables()-»
 			variableMap = new HashMap<String, Object>();
+				«FOREACH declarations.typeSelect(VariableDefinition) AS variable-»
+				variableMap.put("«variable.name»", new «variable.type.getJavaClassType()»(«variable.type.getInitialValue()»));
+				«ENDFOREACH-»
+			«ENDIF-»
+			
 			«IF hasIncomingEvents()-»
 			inEventMap = new HashMap<String, Event<Events>>();
 			«ENDIF-»
+			
 			«IF hasOutgoingEvents()-»
 			outEventMap = new HashMap<String, Event<Events>>();
 			«ENDIF-»
-			«FOREACH declarations.typeSelect(VariableDefinition) AS variable-»
-			variableMap.put("«variable.name»", new «variable.type.getJavaClassType()»(«variable.type.getInitialValue()»));
-			«ENDFOREACH-»
+			
 			«FOREACH declarations.typeSelect(EventDefinition) AS event-»
 			«IF event.direction == Direction::IN-»
 			inEventMap.put("«event.name»", new «event.getEventType()»(«event.getCreationSignature()»));
@@ -81,7 +92,7 @@ public class 
 			«ENDFOREACH-»	
 		«ENDIF-»
 	}
-	«ENDIF-»
+	
 		
 	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
 	
@@ -167,14 +178,19 @@ public class 
 	
 	«IF (hasVariables() || hasIncomingEvents()) && entry.createGenericInterfaceSupport()-»
 	public boolean raiseEvent(String name) {
+		«IF hasIncomingEvents()-»
 		if (inEventMap.get(name) != null) {
 			return statemachine.getOccuredEvents().add(inEventMap.get(name));
 		}
+		«ENDIF-»
 		return false;
 	}
-
+	
+	«IF hasIncomingEvents()-»
 	@SuppressWarnings("unchecked")
+	«ENDIF-»
 	public boolean raiseEvent(String name, Object value) {
+		«IF hasIncomingEvents()-»
 		if (inEventMap.get(name) != null
 				&& inEventMap.get(name) instanceof ValuedEvent) {
 			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
@@ -184,10 +200,12 @@ public class 
 						.add(inEventMap.get(name));
 			}
 		}
+		«ENDIF-»
 		return false;
 	}
 
 	public boolean setVariable(String name, Object value) {
+		«IF hasVariables()-»
 		if (variableMap.get(name) != null
 				&& variableMap.get(name).getClass() == value.getClass()) {
 			Object oldValue = variableMap.get(name);
@@ -196,11 +214,16 @@ public class 
 					Variables.valueOf(name), variableMap.get(name), oldValue));
 			return true;
 		}
+		«ENDIF-»
 		return false;
 	}
 	
 	public Object getVariable(String name) {
+		«IF hasVariables()-»
 		return variableMap.get(name);
+		«ELSE-»
+		return null;
+		«ENDIF-»
 	}
 	«ENDIF-»
 }

+ 3 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/ExecutionModelExtensions.ext

@@ -37,6 +37,9 @@ boolean isTimedStatemachine(ExecutionFlow this) :
 boolean hasIncomingEvents(Scope this) :
 	!declarations.typeSelect(EventDefinition).select(event|event.direction == Direction::IN).isEmpty;
 	
+boolean hasIncomingValuedEvents(Scope this) :
+	!declarations.typeSelect(EventDefinition).select(event|event.direction == Direction::IN).select(event|!event.type.isVoid()).isEmpty;
+	
 boolean hasOutgoingEvents(Scope this) :
 	!declarations.typeSelect(EventDefinition).select(event|event.direction == Direction::OUT).isEmpty;
 

+ 5 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Main.xpt

@@ -13,6 +13,7 @@ Contributors:
 «IMPORT sgen»
 
 «EXTENSION org::yakindu::sct::generator::java::templates::GenmodelEntries»
+«EXTENSION org::yakindu::sct::generator::java::templates::ExecutionModelExtensions»
 
 «DEFINE main(sgen::GeneratorEntry entry) FOR ExecutionFlow»
 	
@@ -67,7 +68,11 @@ Contributors:
 	«REM» concrete files «ENDREM»
 	«FOREACH this.scopes.typeSelect(InterfaceScope) AS scope»
 	«EXPAND CustomInterface::file(entry) FOR scope»
+	«EXPAND CustomIInterfaceImpl::file(entry) FOR scope»
 	«EXPAND CustomInterfaceImpl::file(entry) FOR scope»
+	«IF entry.createEventBasedStatemachine() && scope.hasIncomingEvents()»
+		«EXPAND CustomEventBasedInterfaceImpl::file(entry) FOR scope»
+	«ENDIF»
 	«ENDFOREACH»
 	
 	«EXPAND CustomCycleBasedStatemachine::file(entry) FOR this»

+ 4 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Naming.ext

@@ -40,6 +40,10 @@ String getInterfaceName(InterfaceScope this) :
 		 
 String getInterfaceImplName(InterfaceScope this) :  getInterfaceName() + "Impl";
 
+String getIInterfaceImplName(InterfaceScope this) : "I" + getInterfaceName() + "Impl";
+
+String getEventBasedInterfaceImplName(InterfaceScope this) : getInterfaceName() + "EventBasedImpl";
+
 String getInterfaceParameter(InterfaceScope this) :
 	if hasEvents() then
 		"this"

+ 44 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,44 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			InterfaceTestCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2(int value) {
+		super.raiseEvent2(value);
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 11 - 7
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/DefaultInterfaceImpl.java

@@ -20,21 +20,25 @@ import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private Map<String, Object> variableMap;
-	private Map<String, Event<Events>> outEventMap;
-	private Map<String, Event<Events>> inEventMap;
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private InterfaceTestCycleBasedStatemachine statemachine;
+	protected InterfaceTestCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(InterfaceTestCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
 		variableMap = new HashMap<String, Object>();
-		inEventMap = new HashMap<String, Event<Events>>();
-		outEventMap = new HashMap<String, Event<Events>>();
 		variableMap.put("var1", new Boolean(false));
 		variableMap.put("var2", new Double(0D));
 		variableMap.put("var3", new Integer(0));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		outEventMap = new HashMap<String, Event<Events>>();
+
 		inEventMap.put("event1", new Event<Events>(Events.Event1, 0));
 		outEventMap.put("event2", new ValuedEvent<Events, Integer>(
 				Events.Event2, 0, 0));

+ 21 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IDefaultInterfaceImpl.java

@@ -0,0 +1,21 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public void raiseEvent2(int value);
+
+}

+ 21 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IInterfaceOtherImpl.java

@@ -0,0 +1,21 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IInterfaceOtherImpl extends InterfaceOther {
+
+	public Event<Events> getEventEvent3();
+
+	public void raiseEvent4();
+
+}

+ 21 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/IInterfaceThirdImpl.java

@@ -0,0 +1,21 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IInterfaceThirdImpl extends InterfaceThird {
+
+	public Event<Events> getEventEvent5();
+
+	public void raiseEvent6(boolean value);
+
+}

+ 44 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherEventBasedImpl.java

@@ -0,0 +1,44 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+public class InterfaceOtherEventBasedImpl extends InterfaceOtherImpl {
+
+	public InterfaceOtherEventBasedImpl(
+			InterfaceTestCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 10 - 6
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceOtherImpl.java

@@ -20,19 +20,23 @@ import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class InterfaceOtherImpl extends NotificationSender
 		implements
-			InterfaceOther {
-	private Map<String, Object> variableMap;
-	private Map<String, Event<Events>> outEventMap;
-	private Map<String, Event<Events>> inEventMap;
+			IInterfaceOtherImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private InterfaceTestCycleBasedStatemachine statemachine;
+	protected InterfaceTestCycleBasedStatemachine statemachine;
 
 	public InterfaceOtherImpl(InterfaceTestCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
 		variableMap = new HashMap<String, Object>();
+		variableMap.put("v1", new Integer(0));
+
 		inEventMap = new HashMap<String, Event<Events>>();
+
 		outEventMap = new HashMap<String, Event<Events>>();
-		variableMap.put("v1", new Integer(0));
+
 		inEventMap.put("event3", new Event<Events>(Events.Event3, 2));
 		outEventMap.put("event4", new Event<Events>(Events.Event4, 2));
 	}

+ 14 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java

@@ -29,7 +29,7 @@ public class InterfaceTestCycleBasedStatemachine
 		State1, State2, State3, State4, $NullState$
 	};
 
-	private Map<String, IGenericAccessInterface> interfaceMap;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[1];
 
@@ -82,26 +82,30 @@ public class InterfaceTestCycleBasedStatemachine
 		return interfaceMap.get(name);
 	}
 
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
 		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return (DefaultInterfaceImpl) getInterface("DefaultInterface");
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	public InterfaceOther getInterfaceOther() {
 		return (InterfaceOther) getInterface("InterfaceOther");
 	}
 
-	private InterfaceOtherImpl getInterfaceOtherImpl() {
-		return (InterfaceOtherImpl) getInterface("InterfaceOther");
+	protected IInterfaceOtherImpl getInterfaceOtherImpl() {
+		return (IInterfaceOtherImpl) getInterface("InterfaceOther");
 	}
 	public InterfaceThird getInterfaceThird() {
 		return (InterfaceThird) getInterface("InterfaceThird");
 	}
 
-	private InterfaceThirdImpl getInterfaceThirdImpl() {
-		return (InterfaceThirdImpl) getInterface("InterfaceThird");
+	protected IInterfaceThirdImpl getInterfaceThirdImpl() {
+		return (IInterfaceThirdImpl) getInterface("InterfaceThird");
 	}
 
 	public void enter() {
@@ -114,7 +118,7 @@ public class InterfaceTestCycleBasedStatemachine
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :
@@ -124,6 +128,7 @@ public class InterfaceTestCycleBasedStatemachine
 
 			case State2 :
 				stateVector[0] = State.$NullState$;
+				getInterfaceOtherImpl().setVarV1(10);
 
 				break;
 
@@ -182,6 +187,7 @@ public class InterfaceTestCycleBasedStatemachine
 	private void reactState2() {
 		if (occuredEvents.contains(getDefaultInterfaceImpl().getEventEvent1())) {
 			stateVector[0] = State.$NullState$;
+			getInterfaceOtherImpl().setVarV1(10);
 
 			nextStateIndex = 0;
 			stateVector[0] = State.State1;

+ 7 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestEventBasedStatemachine.java

@@ -22,6 +22,13 @@ public class InterfaceTestEventBasedStatemachine
 
 	public InterfaceTestEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
+		getInterfaceMap().put("InterfaceOther",
+				new InterfaceOtherEventBasedImpl(this));
+		getInterfaceMap().put("InterfaceThird",
+				new InterfaceThirdEventBasedImpl(this));
 	}
 
 	@Override

+ 44 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdEventBasedImpl.java

@@ -0,0 +1,44 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.interfacetest;
+
+public class InterfaceThirdEventBasedImpl extends InterfaceThirdImpl {
+
+	public InterfaceThirdEventBasedImpl(
+			InterfaceTestCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+	public void raiseEvent6(boolean value) {
+		super.raiseEvent6(value);
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 10 - 6
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceThirdImpl.java

@@ -20,19 +20,23 @@ import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class InterfaceThirdImpl extends NotificationSender
 		implements
-			InterfaceThird {
-	private Map<String, Object> variableMap;
-	private Map<String, Event<Events>> outEventMap;
-	private Map<String, Event<Events>> inEventMap;
+			IInterfaceThirdImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private InterfaceTestCycleBasedStatemachine statemachine;
+	protected InterfaceTestCycleBasedStatemachine statemachine;
 
 	public InterfaceThirdImpl(InterfaceTestCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
 		variableMap = new HashMap<String, Object>();
+		variableMap.put("v1", new Double(0D));
+
 		inEventMap = new HashMap<String, Event<Events>>();
+
 		outEventMap = new HashMap<String, Event<Events>>();
-		variableMap.put("v1", new Double(0D));
+
 		inEventMap.put("event5", new Event<Events>(Events.Event5, 4));
 		outEventMap.put("event6", new ValuedEvent<Events, Boolean>(
 				Events.Event6, 4, false));

+ 3 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterface.java

@@ -10,7 +10,9 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_deephistory;
 
-public interface DefaultInterface {
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
+
+public interface DefaultInterface extends IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4, Event5, Event6, Event7, Event8, Event9,

+ 72 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,72 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_deephistory;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_DeepHistoryCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+	public void raiseEvent6() {
+		super.raiseEvent6();
+		statemachine.runCycle();
+	}
+	public void raiseEvent7() {
+		super.raiseEvent7();
+		statemachine.runCycle();
+	}
+	public void raiseEvent8() {
+		super.raiseEvent8();
+		statemachine.runCycle();
+	}
+	public void raiseEvent9() {
+		super.raiseEvent9();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 57 - 30
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/DefaultInterfaceImpl.java

@@ -10,33 +10,32 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_deephistory;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
-public class DefaultInterfaceImpl implements DefaultInterface {
-	private final Event<Events> EventEvent1 = new Event<Events>(Events.Event1,
-			0);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-	private final Event<Events> EventEvent5 = new Event<Events>(Events.Event5,
-			0);
-	private final Event<Events> EventEvent6 = new Event<Events>(Events.Event6,
-			0);
-	private final Event<Events> EventEvent7 = new Event<Events>(Events.Event7,
-			0);
-	private final Event<Events> EventEvent8 = new Event<Events>(Events.Event8,
-			0);
-	private final Event<Events> EventEvent9 = new Event<Events>(Events.Event9,
-			0);
-
-	private Test_DeepHistoryCycleBasedStatemachine statemachine;
+public class DefaultInterfaceImpl implements IDefaultInterfaceImpl {
+	protected Map<String, Event<Events>> inEventMap;
+
+	protected Test_DeepHistoryCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_DeepHistoryCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new Event<Events>(Events.Event1, 0));
+		inEventMap.put("event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("event4", new Event<Events>(Events.Event4, 0));
+		inEventMap.put("event5", new Event<Events>(Events.Event5, 0));
+		inEventMap.put("event6", new Event<Events>(Events.Event6, 0));
+		inEventMap.put("event7", new Event<Events>(Events.Event7, 0));
+		inEventMap.put("event8", new Event<Events>(Events.Event8, 0));
+		inEventMap.put("event9", new Event<Events>(Events.Event9, 0));
 	}
 
 	public void raiseEvent1() {
@@ -44,7 +43,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent1() {
-		return EventEvent1;
+		return inEventMap.get("event1");
 	}
 
 	public void raiseEvent2() {
@@ -52,7 +51,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("event2");
 	}
 
 	public void raiseEvent3() {
@@ -60,7 +59,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
 	public void raiseEvent4() {
@@ -68,7 +67,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("event4");
 	}
 
 	public void raiseEvent5() {
@@ -76,7 +75,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent5() {
-		return EventEvent5;
+		return inEventMap.get("event5");
 	}
 
 	public void raiseEvent6() {
@@ -84,7 +83,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent6() {
-		return EventEvent6;
+		return inEventMap.get("event6");
 	}
 
 	public void raiseEvent7() {
@@ -92,7 +91,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent7() {
-		return EventEvent7;
+		return inEventMap.get("event7");
 	}
 
 	public void raiseEvent8() {
@@ -100,7 +99,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent8() {
-		return EventEvent8;
+		return inEventMap.get("event8");
 	}
 
 	public void raiseEvent9() {
@@ -108,7 +107,35 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent9() {
-		return EventEvent9;
+		return inEventMap.get("event9");
+	}
+
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
 	}
 
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return null;
+	}
 }

+ 35 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/IDefaultInterfaceImpl.java

@@ -0,0 +1,35 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_deephistory;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+	public Event<Events> getEventEvent5();
+
+	public Event<Events> getEventEvent6();
+
+	public Event<Events> getEventEvent7();
+
+	public Event<Events> getEventEvent8();
+
+	public Event<Events> getEventEvent9();
+
+}

+ 105 - 7
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java

@@ -14,15 +14,22 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
-public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
+public class Test_DeepHistoryCycleBasedStatemachine
+		implements
+			IGenericAccessStatemachine,
+			IStatemachine {
 
 	public enum State {
 		State1, State2, State3, State4, State6, State7, State8, State9, State5, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private State[] historyVector = new State[3];
 
@@ -37,7 +44,8 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	public Test_DeepHistoryCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(9);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 
 	}
 
@@ -74,12 +82,20 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 		return false;
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {
@@ -89,7 +105,7 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :
@@ -98,26 +114,46 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 				break;
 
 			case State3 :
+
+				historyVector[0] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State6 :
+
+				historyVector[0] = stateVector[0];
+
+				historyVector[1] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State8 :
+
+				historyVector[0] = stateVector[0];
+
+				historyVector[1] = stateVector[0];
+
+				historyVector[2] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State9 :
+
+				historyVector[0] = stateVector[0];
+
+				historyVector[1] = stateVector[0];
+
+				historyVector[2] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State5 :
+
+				historyVector[0] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
@@ -246,16 +282,26 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 					break;
 
 				case State6 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -299,16 +345,26 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 					break;
 
 				case State6 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -339,11 +395,15 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 						break;
 
 					case State8 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -384,16 +444,26 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 					break;
 
 				case State6 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -424,11 +494,15 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 						break;
 
 					case State8 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -494,16 +568,26 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 					break;
 
 				case State6 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -534,11 +618,15 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 						break;
 
 					case State8 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[2] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -604,16 +692,26 @@ public class Test_DeepHistoryCycleBasedStatemachine implements IStatemachine {
 					break;
 
 				case State6 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
+
+					historyVector[2] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;

+ 3 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryEventBasedStatemachine.java

@@ -22,6 +22,9 @@ public class Test_DeepHistoryEventBasedStatemachine
 
 	public Test_DeepHistoryEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
 	}
 
 	@Override

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterface.java

@@ -11,9 +11,13 @@ Contributors:
 package org.yakindu.sct.runtime.java.test_expression;
 
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.ValuedEvent;
 
-public interface DefaultInterface extends INotificationSender {
+public interface DefaultInterface
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3,

+ 48 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,48 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_expression;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_ExpressionCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1(int value) {
+		super.raiseEvent1(value);
+		statemachine.runCycle();
+	}
+	public void raiseEvent2(double value) {
+		super.raiseEvent2(value);
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 75 - 26
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/DefaultInterfaceImpl.java

@@ -10,6 +10,8 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_expression;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.EventNotification;
@@ -18,19 +20,33 @@ import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private final ValuedEvent<Events, Integer> EventEvent1 = new ValuedEvent<Events, Integer>(
-			Events.Event1, 0, 0);
-	private final ValuedEvent<Events, Double> EventEvent2 = new ValuedEvent<Events, Double>(
-			Events.Event2, 0, 0D);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private Test_ExpressionCycleBasedStatemachine statemachine;
+	protected Test_ExpressionCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_ExpressionCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("var1", new Integer(0));
+		variableMap.put("var2", new Integer(0));
+		variableMap.put("var3", new Double(0D));
+		variableMap.put("var4", new Double(0D));
+		variableMap.put("var5", new Boolean(false));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		outEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new ValuedEvent<Events, Integer>(
+				Events.Event1, 0, 0));
+		outEventMap.put("event2", new ValuedEvent<Events, Double>(
+				Events.Event2, 0, 0D));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
 	}
 
 	public void raiseEvent1(int value) {
@@ -38,8 +54,9 @@ public class DefaultInterfaceImpl extends NotificationSender
 		statemachine.getOccuredEvents().add(getEventEvent1());
 	}
 
+	@SuppressWarnings("unchecked")
 	public ValuedEvent<Events, Integer> getEventEvent1() {
-		return EventEvent1;
+		return (ValuedEvent<Events, Integer>) inEventMap.get("event1");
 	}
 
 	public void raiseEvent2(double value) {
@@ -49,8 +66,9 @@ public class DefaultInterfaceImpl extends NotificationSender
 		notifyListeners(new EventNotification(getEventEvent2()));
 	}
 
+	@SuppressWarnings("unchecked")
 	public ValuedEvent<Events, Double> getEventEvent2() {
-		return EventEvent2;
+		return (ValuedEvent<Events, Double>) outEventMap.get("event2");
 	}
 
 	public boolean isRaisedEvent2() {
@@ -62,63 +80,94 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
-	private int varVar1 = 6;
 	public int getVarVar1() {
-		return varVar1;
+		return (Integer) variableMap.get("var1");
 	}
 
 	public void setVarVar1(int value) {
 		int oldValue = getVarVar1();
-		varVar1 = value;
+		variableMap.put("var1", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.var1,
 				getVarVar1(), oldValue));
 	}
-	private int varVar2 = 123;
 	public int getVarVar2() {
-		return varVar2;
+		return (Integer) variableMap.get("var2");
 	}
 
 	public void setVarVar2(int value) {
 		int oldValue = getVarVar2();
-		varVar2 = value;
+		variableMap.put("var2", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.var2,
 				getVarVar2(), oldValue));
 	}
-	private double varVar3 = 19.4;
 	public double getVarVar3() {
-		return varVar3;
+		return (Double) variableMap.get("var3");
 	}
 
 	public void setVarVar3(double value) {
 		double oldValue = getVarVar3();
-		varVar3 = value;
+		variableMap.put("var3", new Double(value));
 		notifyListeners(new VariableNotification<Double>(Variables.var3,
 				getVarVar3(), oldValue));
 	}
-	private double varVar4 = 43.3;
 	public double getVarVar4() {
-		return varVar4;
+		return (Double) variableMap.get("var4");
 	}
 
 	public void setVarVar4(double value) {
 		double oldValue = getVarVar4();
-		varVar4 = value;
+		variableMap.put("var4", new Double(value));
 		notifyListeners(new VariableNotification<Double>(Variables.var4,
 				getVarVar4(), oldValue));
 	}
-	private boolean varVar5 = false;
 	public boolean getVarVar5() {
-		return varVar5;
+		return (Boolean) variableMap.get("var5");
 	}
 
 	public void setVarVar5(boolean value) {
 		boolean oldValue = getVarVar5();
-		varVar5 = value;
+		variableMap.put("var5", new Boolean(value));
 		notifyListeners(new VariableNotification<Boolean>(Variables.var5,
 				getVarVar5(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 24 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IDefaultInterfaceImpl.java

@@ -0,0 +1,24 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_expression;
+
+import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public ValuedEvent<Events, Integer> getEventEvent1();
+
+	public void raiseEvent2(double value);
+
+	public Event<Events> getEventEvent3();
+
+}

+ 10 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IDefaultIterfaceImpl.java

@@ -0,0 +1,10 @@
+package org.yakindu.sct.runtime.java.test_expression;
+
+import org.yakindu.sct.runtime.java.ValuedEvent;
+
+public interface IDefaultIterfaceImpl extends DefaultInterface {
+
+	public ValuedEvent<Events, Integer> getEventEvent1();
+	
+	public void raiseEvent2(double value);
+}

+ 15 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/IInterfaceOtherImpl.java

@@ -0,0 +1,15 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_expression;
+
+public interface IInterfaceOtherImpl extends InterfaceOther {
+
+}

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOther.java

@@ -11,8 +11,12 @@ Contributors:
 package org.yakindu.sct.runtime.java.test_expression;
 
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface InterfaceOther extends INotificationSender {
+public interface InterfaceOther
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Variables {
 		var1, var2, var3,

+ 42 - 10
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/InterfaceOtherImpl.java

@@ -10,45 +10,77 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_expression;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.VariableNotification;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class InterfaceOtherImpl extends NotificationSender
 		implements
-			InterfaceOther {
+			IInterfaceOtherImpl {
+	protected Map<String, Object> variableMap;
+
+	public InterfaceOtherImpl() {
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("var1", new Boolean(false));
+		variableMap.put("var2", new Double(0D));
+		variableMap.put("var3", new Integer(0));
+
+	}
 
-	private boolean varVar1;
 	public boolean getVarVar1() {
-		return varVar1;
+		return (Boolean) variableMap.get("var1");
 	}
 
 	public void setVarVar1(boolean value) {
 		boolean oldValue = getVarVar1();
-		varVar1 = value;
+		variableMap.put("var1", new Boolean(value));
 		notifyListeners(new VariableNotification<Boolean>(Variables.var1,
 				getVarVar1(), oldValue));
 	}
-	private double varVar2;
 	public double getVarVar2() {
-		return varVar2;
+		return (Double) variableMap.get("var2");
 	}
 
 	public void setVarVar2(double value) {
 		double oldValue = getVarVar2();
-		varVar2 = value;
+		variableMap.put("var2", new Double(value));
 		notifyListeners(new VariableNotification<Double>(Variables.var2,
 				getVarVar2(), oldValue));
 	}
-	private int varVar3;
 	public int getVarVar3() {
-		return varVar3;
+		return (Integer) variableMap.get("var3");
 	}
 
 	public void setVarVar3(int value) {
 		int oldValue = getVarVar3();
-		varVar3 = value;
+		variableMap.put("var3", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.var3,
 				getVarVar3(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		return false;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 27 - 12
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java

@@ -14,16 +14,22 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
-public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
+public class Test_ExpressionCycleBasedStatemachine
+		implements
+			IGenericAccessStatemachine,
+			IStatemachine {
 
 	public enum State {
 		State1, State2, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
-	private InterfaceOtherImpl interfaceOther;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[1];
 
@@ -36,8 +42,9 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 	public Test_ExpressionCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(3);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
-		interfaceOther = new InterfaceOtherImpl();
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
+		interfaceMap.put("InterfaceOther", new InterfaceOtherImpl());
 
 	}
 
@@ -70,19 +77,27 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 		return false;
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	public InterfaceOther getInterfaceOther() {
-		return interfaceOther;
+		return (InterfaceOther) getInterface("InterfaceOther");
 	}
 
-	private InterfaceOtherImpl getInterfaceOtherImpl() {
-		return interfaceOther;
+	protected IInterfaceOtherImpl getInterfaceOtherImpl() {
+		return (IInterfaceOtherImpl) getInterface("InterfaceOther");
 	}
 
 	public void enter() {
@@ -103,7 +118,7 @@ public class Test_ExpressionCycleBasedStatemachine implements IStatemachine {
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :

+ 3 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionEventBasedStatemachine.java

@@ -22,6 +22,9 @@ public class Test_ExpressionEventBasedStatemachine
 
 	public Test_ExpressionEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
 	}
 
 	@Override

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterface.java

@@ -11,8 +11,12 @@ Contributors:
 package org.yakindu.sct.runtime.java.test_hierarchy;
 
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface DefaultInterface extends INotificationSender {
+public interface DefaultInterface
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4, Event5, Event6, Event7, Event8, Event9, Event10, Event11, Event12, Event13, Event14, Event15, Event16,

+ 100 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,100 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_hierarchy;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_HierarchyCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+	public void raiseEvent6() {
+		super.raiseEvent6();
+		statemachine.runCycle();
+	}
+	public void raiseEvent7() {
+		super.raiseEvent7();
+		statemachine.runCycle();
+	}
+	public void raiseEvent8() {
+		super.raiseEvent8();
+		statemachine.runCycle();
+	}
+	public void raiseEvent9() {
+		super.raiseEvent9();
+		statemachine.runCycle();
+	}
+	public void raiseEvent10() {
+		super.raiseEvent10();
+		statemachine.runCycle();
+	}
+	public void raiseEvent11() {
+		super.raiseEvent11();
+		statemachine.runCycle();
+	}
+	public void raiseEvent12() {
+		super.raiseEvent12();
+		statemachine.runCycle();
+	}
+	public void raiseEvent13() {
+		super.raiseEvent13();
+		statemachine.runCycle();
+	}
+	public void raiseEvent14() {
+		super.raiseEvent14();
+		statemachine.runCycle();
+	}
+	public void raiseEvent15() {
+		super.raiseEvent15();
+		statemachine.runCycle();
+	}
+	public void raiseEvent16() {
+		super.raiseEvent16();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 87 - 57
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/DefaultInterfaceImpl.java

@@ -10,51 +10,47 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_hierarchy;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.VariableNotification;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private final Event<Events> EventEvent1 = new Event<Events>(Events.Event1,
-			0);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-	private final Event<Events> EventEvent5 = new Event<Events>(Events.Event5,
-			0);
-	private final Event<Events> EventEvent6 = new Event<Events>(Events.Event6,
-			0);
-	private final Event<Events> EventEvent7 = new Event<Events>(Events.Event7,
-			0);
-	private final Event<Events> EventEvent8 = new Event<Events>(Events.Event8,
-			0);
-	private final Event<Events> EventEvent9 = new Event<Events>(Events.Event9,
-			0);
-	private final Event<Events> EventEvent10 = new Event<Events>(
-			Events.Event10, 0);
-	private final Event<Events> EventEvent11 = new Event<Events>(
-			Events.Event11, 0);
-	private final Event<Events> EventEvent12 = new Event<Events>(
-			Events.Event12, 0);
-	private final Event<Events> EventEvent13 = new Event<Events>(
-			Events.Event13, 0);
-	private final Event<Events> EventEvent14 = new Event<Events>(
-			Events.Event14, 0);
-	private final Event<Events> EventEvent15 = new Event<Events>(
-			Events.Event15, 0);
-	private final Event<Events> EventEvent16 = new Event<Events>(
-			Events.Event16, 0);
-
-	private Test_HierarchyCycleBasedStatemachine statemachine;
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> inEventMap;
+
+	protected Test_HierarchyCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_HierarchyCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("s1", new Integer(0));
+		variableMap.put("s2", new Integer(0));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new Event<Events>(Events.Event1, 0));
+		inEventMap.put("event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("event4", new Event<Events>(Events.Event4, 0));
+		inEventMap.put("event5", new Event<Events>(Events.Event5, 0));
+		inEventMap.put("event6", new Event<Events>(Events.Event6, 0));
+		inEventMap.put("event7", new Event<Events>(Events.Event7, 0));
+		inEventMap.put("event8", new Event<Events>(Events.Event8, 0));
+		inEventMap.put("event9", new Event<Events>(Events.Event9, 0));
+		inEventMap.put("event10", new Event<Events>(Events.Event10, 0));
+		inEventMap.put("event11", new Event<Events>(Events.Event11, 0));
+		inEventMap.put("event12", new Event<Events>(Events.Event12, 0));
+		inEventMap.put("event13", new Event<Events>(Events.Event13, 0));
+		inEventMap.put("event14", new Event<Events>(Events.Event14, 0));
+		inEventMap.put("event15", new Event<Events>(Events.Event15, 0));
+		inEventMap.put("event16", new Event<Events>(Events.Event16, 0));
 	}
 
 	public void raiseEvent1() {
@@ -62,7 +58,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent1() {
-		return EventEvent1;
+		return inEventMap.get("event1");
 	}
 
 	public void raiseEvent2() {
@@ -70,7 +66,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("event2");
 	}
 
 	public void raiseEvent3() {
@@ -78,7 +74,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
 	public void raiseEvent4() {
@@ -86,7 +82,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("event4");
 	}
 
 	public void raiseEvent5() {
@@ -94,7 +90,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent5() {
-		return EventEvent5;
+		return inEventMap.get("event5");
 	}
 
 	public void raiseEvent6() {
@@ -102,7 +98,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent6() {
-		return EventEvent6;
+		return inEventMap.get("event6");
 	}
 
 	public void raiseEvent7() {
@@ -110,7 +106,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent7() {
-		return EventEvent7;
+		return inEventMap.get("event7");
 	}
 
 	public void raiseEvent8() {
@@ -118,7 +114,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent8() {
-		return EventEvent8;
+		return inEventMap.get("event8");
 	}
 
 	public void raiseEvent9() {
@@ -126,7 +122,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent9() {
-		return EventEvent9;
+		return inEventMap.get("event9");
 	}
 
 	public void raiseEvent10() {
@@ -134,7 +130,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent10() {
-		return EventEvent10;
+		return inEventMap.get("event10");
 	}
 
 	public void raiseEvent11() {
@@ -142,7 +138,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent11() {
-		return EventEvent11;
+		return inEventMap.get("event11");
 	}
 
 	public void raiseEvent12() {
@@ -150,7 +146,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent12() {
-		return EventEvent12;
+		return inEventMap.get("event12");
 	}
 
 	public void raiseEvent13() {
@@ -158,7 +154,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent13() {
-		return EventEvent13;
+		return inEventMap.get("event13");
 	}
 
 	public void raiseEvent14() {
@@ -166,7 +162,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent14() {
-		return EventEvent14;
+		return inEventMap.get("event14");
 	}
 
 	public void raiseEvent15() {
@@ -174,7 +170,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent15() {
-		return EventEvent15;
+		return inEventMap.get("event15");
 	}
 
 	public void raiseEvent16() {
@@ -182,30 +178,64 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent16() {
-		return EventEvent16;
+		return inEventMap.get("event16");
 	}
 
-	private int varS1 = 0;
 	public int getVarS1() {
-		return varS1;
+		return (Integer) variableMap.get("s1");
 	}
 
 	public void setVarS1(int value) {
 		int oldValue = getVarS1();
-		varS1 = value;
+		variableMap.put("s1", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.s1,
 				getVarS1(), oldValue));
 	}
-	private int varS2;
 	public int getVarS2() {
-		return varS2;
+		return (Integer) variableMap.get("s2");
 	}
 
 	public void setVarS2(int value) {
 		int oldValue = getVarS2();
-		varS2 = value;
+		variableMap.put("s2", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.s2,
 				getVarS2(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 49 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/IDefaultInterfaceImpl.java

@@ -0,0 +1,49 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_hierarchy;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+	public Event<Events> getEventEvent5();
+
+	public Event<Events> getEventEvent6();
+
+	public Event<Events> getEventEvent7();
+
+	public Event<Events> getEventEvent8();
+
+	public Event<Events> getEventEvent9();
+
+	public Event<Events> getEventEvent10();
+
+	public Event<Events> getEventEvent11();
+
+	public Event<Events> getEventEvent12();
+
+	public Event<Events> getEventEvent13();
+
+	public Event<Events> getEventEvent14();
+
+	public Event<Events> getEventEvent15();
+
+	public Event<Events> getEventEvent16();
+
+}

+ 23 - 7
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java

@@ -14,15 +14,22 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
-public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
+public class Test_HierarchyCycleBasedStatemachine
+		implements
+			IGenericAccessStatemachine,
+			IStatemachine {
 
 	public enum State {
 		State1, State9, State10, State2, State3, State4, State5, State6, State7, State8, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[1];
 
@@ -35,7 +42,8 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	public Test_HierarchyCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(16);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 
 	}
 
@@ -68,12 +76,20 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 		return false;
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {
@@ -89,7 +105,7 @@ public class Test_HierarchyCycleBasedStatemachine implements IStatemachine {
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State9 :

+ 3 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyEventBasedStatemachine.java

@@ -22,6 +22,9 @@ public class Test_HierarchyEventBasedStatemachine
 
 	public Test_HierarchyEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
 	}
 
 	@Override

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterface.java

@@ -11,8 +11,12 @@ Contributors:
 package org.yakindu.sct.runtime.java.test_localactions;
 
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface DefaultInterface extends INotificationSender {
+public interface DefaultInterface
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4,

+ 52 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,52 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_localactions;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_LocalActionsCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 66 - 24
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/DefaultInterfaceImpl.java

@@ -10,27 +10,36 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_localactions;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.VariableNotification;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private final Event<Events> EventEvent1 = new Event<Events>(Events.Event1,
-			0);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-
-	private Test_LocalActionsCycleBasedStatemachine statemachine;
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> inEventMap;
+
+	protected Test_LocalActionsCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_LocalActionsCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("i", new Integer(0));
+		variableMap.put("j", new Integer(0));
+		variableMap.put("c", new Integer(0));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("Event1", new Event<Events>(Events.Event1, 0));
+		inEventMap.put("Event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("Event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("Event4", new Event<Events>(Events.Event4, 0));
 	}
 
 	public void raiseEvent1() {
@@ -38,7 +47,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent1() {
-		return EventEvent1;
+		return inEventMap.get("Event1");
 	}
 
 	public void raiseEvent2() {
@@ -46,7 +55,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("Event2");
 	}
 
 	public void raiseEvent3() {
@@ -54,7 +63,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("Event3");
 	}
 
 	public void raiseEvent4() {
@@ -62,41 +71,74 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("Event4");
 	}
 
-	private int varI;
 	public int getVarI() {
-		return varI;
+		return (Integer) variableMap.get("i");
 	}
 
 	public void setVarI(int value) {
 		int oldValue = getVarI();
-		varI = value;
+		variableMap.put("i", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.i,
 				getVarI(), oldValue));
 	}
-	private int varJ;
 	public int getVarJ() {
-		return varJ;
+		return (Integer) variableMap.get("j");
 	}
 
 	public void setVarJ(int value) {
 		int oldValue = getVarJ();
-		varJ = value;
+		variableMap.put("j", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.j,
 				getVarJ(), oldValue));
 	}
-	private int varC;
 	public int getVarC() {
-		return varC;
+		return (Integer) variableMap.get("c");
 	}
 
 	public void setVarC(int value) {
 		int oldValue = getVarC();
-		varC = value;
+		variableMap.put("c", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.c,
 				getVarC(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 25 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/IDefaultInterfaceImpl.java

@@ -0,0 +1,25 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_localactions;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+}

+ 20 - 6
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java

@@ -14,6 +14,10 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimerService;
@@ -22,6 +26,7 @@ import org.yakindu.sct.runtime.java.Notification;
 
 public class Test_LocalActionsCycleBasedStatemachine
 		implements
+			IGenericAccessStatemachine,
 			ITimedStatemachine {
 
 	private enum TimeEvents {
@@ -37,7 +42,7 @@ public class Test_LocalActionsCycleBasedStatemachine
 		State1, State2, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[1];
 
@@ -54,7 +59,8 @@ public class Test_LocalActionsCycleBasedStatemachine
 	public Test_LocalActionsCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(6);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 		State1_time_event_0.setStatemachine(this);
 		State2_time_event_0.setStatemachine(this);
 
@@ -108,12 +114,20 @@ public class Test_LocalActionsCycleBasedStatemachine
 		}
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {
@@ -127,7 +141,7 @@ public class Test_LocalActionsCycleBasedStatemachine
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :

+ 10 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsEventBasedStatemachine.java

@@ -14,6 +14,8 @@ import java.util.LinkedList;
 
 import org.yakindu.sct.runtime.java.Event;
 
+import org.yakindu.sct.runtime.java.Notification;
+
 public class Test_LocalActionsEventBasedStatemachine
 		extends
 			Test_LocalActionsCycleBasedStatemachine {
@@ -22,6 +24,14 @@ public class Test_LocalActionsEventBasedStatemachine
 
 	public Test_LocalActionsEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
+	}
+
+	public void notify(Notification notification) {
+		super.notify(notification);
+		runCycle();
 	}
 
 	@Override

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterface.java

@@ -11,8 +11,12 @@ Contributors:
 package org.yakindu.sct.runtime.java.test_parallelregions;
 
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface DefaultInterface extends INotificationSender {
+public interface DefaultInterface
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4, Event5, Event6, Event7, Event8, Event9, Event10, Event11, Event12, Event13, Event14,

+ 92 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,92 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_parallelregions;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_ParallelRegionsCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+	public void raiseEvent6() {
+		super.raiseEvent6();
+		statemachine.runCycle();
+	}
+	public void raiseEvent7() {
+		super.raiseEvent7();
+		statemachine.runCycle();
+	}
+	public void raiseEvent8() {
+		super.raiseEvent8();
+		statemachine.runCycle();
+	}
+	public void raiseEvent9() {
+		super.raiseEvent9();
+		statemachine.runCycle();
+	}
+	public void raiseEvent10() {
+		super.raiseEvent10();
+		statemachine.runCycle();
+	}
+	public void raiseEvent11() {
+		super.raiseEvent11();
+		statemachine.runCycle();
+	}
+	public void raiseEvent12() {
+		super.raiseEvent12();
+		statemachine.runCycle();
+	}
+	public void raiseEvent13() {
+		super.raiseEvent13();
+		statemachine.runCycle();
+	}
+	public void raiseEvent14() {
+		super.raiseEvent14();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 83 - 51
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/DefaultInterfaceImpl.java

@@ -10,47 +10,45 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_parallelregions;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.VariableNotification;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private final Event<Events> EventEvent1 = new Event<Events>(Events.Event1,
-			0);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-	private final Event<Events> EventEvent5 = new Event<Events>(Events.Event5,
-			0);
-	private final Event<Events> EventEvent6 = new Event<Events>(Events.Event6,
-			0);
-	private final Event<Events> EventEvent7 = new Event<Events>(Events.Event7,
-			0);
-	private final Event<Events> EventEvent8 = new Event<Events>(Events.Event8,
-			0);
-	private final Event<Events> EventEvent9 = new Event<Events>(Events.Event9,
-			0);
-	private final Event<Events> EventEvent10 = new Event<Events>(
-			Events.Event10, 0);
-	private final Event<Events> EventEvent11 = new Event<Events>(
-			Events.Event11, 0);
-	private final Event<Events> EventEvent12 = new Event<Events>(
-			Events.Event12, 0);
-	private final Event<Events> EventEvent13 = new Event<Events>(
-			Events.Event13, 0);
-	private final Event<Events> EventEvent14 = new Event<Events>(
-			Events.Event14, 0);
-
-	private Test_ParallelRegionsCycleBasedStatemachine statemachine;
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> inEventMap;
+
+	protected Test_ParallelRegionsCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_ParallelRegionsCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("reg3", new Integer(0));
+		variableMap.put("hierarchy", new Integer(0));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new Event<Events>(Events.Event1, 0));
+		inEventMap.put("event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("event4", new Event<Events>(Events.Event4, 0));
+		inEventMap.put("event5", new Event<Events>(Events.Event5, 0));
+		inEventMap.put("event6", new Event<Events>(Events.Event6, 0));
+		inEventMap.put("event7", new Event<Events>(Events.Event7, 0));
+		inEventMap.put("event8", new Event<Events>(Events.Event8, 0));
+		inEventMap.put("event9", new Event<Events>(Events.Event9, 0));
+		inEventMap.put("event10", new Event<Events>(Events.Event10, 0));
+		inEventMap.put("event11", new Event<Events>(Events.Event11, 0));
+		inEventMap.put("event12", new Event<Events>(Events.Event12, 0));
+		inEventMap.put("event13", new Event<Events>(Events.Event13, 0));
+		inEventMap.put("event14", new Event<Events>(Events.Event14, 0));
 	}
 
 	public void raiseEvent1() {
@@ -58,7 +56,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent1() {
-		return EventEvent1;
+		return inEventMap.get("event1");
 	}
 
 	public void raiseEvent2() {
@@ -66,7 +64,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("event2");
 	}
 
 	public void raiseEvent3() {
@@ -74,7 +72,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
 	public void raiseEvent4() {
@@ -82,7 +80,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("event4");
 	}
 
 	public void raiseEvent5() {
@@ -90,7 +88,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent5() {
-		return EventEvent5;
+		return inEventMap.get("event5");
 	}
 
 	public void raiseEvent6() {
@@ -98,7 +96,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent6() {
-		return EventEvent6;
+		return inEventMap.get("event6");
 	}
 
 	public void raiseEvent7() {
@@ -106,7 +104,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent7() {
-		return EventEvent7;
+		return inEventMap.get("event7");
 	}
 
 	public void raiseEvent8() {
@@ -114,7 +112,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent8() {
-		return EventEvent8;
+		return inEventMap.get("event8");
 	}
 
 	public void raiseEvent9() {
@@ -122,7 +120,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent9() {
-		return EventEvent9;
+		return inEventMap.get("event9");
 	}
 
 	public void raiseEvent10() {
@@ -130,7 +128,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent10() {
-		return EventEvent10;
+		return inEventMap.get("event10");
 	}
 
 	public void raiseEvent11() {
@@ -138,7 +136,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent11() {
-		return EventEvent11;
+		return inEventMap.get("event11");
 	}
 
 	public void raiseEvent12() {
@@ -146,7 +144,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent12() {
-		return EventEvent12;
+		return inEventMap.get("event12");
 	}
 
 	public void raiseEvent13() {
@@ -154,7 +152,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent13() {
-		return EventEvent13;
+		return inEventMap.get("event13");
 	}
 
 	public void raiseEvent14() {
@@ -162,30 +160,64 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent14() {
-		return EventEvent14;
+		return inEventMap.get("event14");
 	}
 
-	private int varReg3 = -(1);
 	public int getVarReg3() {
-		return varReg3;
+		return (Integer) variableMap.get("reg3");
 	}
 
 	public void setVarReg3(int value) {
 		int oldValue = getVarReg3();
-		varReg3 = value;
+		variableMap.put("reg3", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.reg3,
 				getVarReg3(), oldValue));
 	}
-	private int varHierarchy;
 	public int getVarHierarchy() {
-		return varHierarchy;
+		return (Integer) variableMap.get("hierarchy");
 	}
 
 	public void setVarHierarchy(int value) {
 		int oldValue = getVarHierarchy();
-		varHierarchy = value;
+		variableMap.put("hierarchy", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.hierarchy,
 				getVarHierarchy(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 45 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/IDefaultInterfaceImpl.java

@@ -0,0 +1,45 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_parallelregions;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+	public Event<Events> getEventEvent5();
+
+	public Event<Events> getEventEvent6();
+
+	public Event<Events> getEventEvent7();
+
+	public Event<Events> getEventEvent8();
+
+	public Event<Events> getEventEvent9();
+
+	public Event<Events> getEventEvent10();
+
+	public Event<Events> getEventEvent11();
+
+	public Event<Events> getEventEvent12();
+
+	public Event<Events> getEventEvent13();
+
+	public Event<Events> getEventEvent14();
+
+}

+ 22 - 8
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java

@@ -14,17 +14,22 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
 public class Test_ParallelRegionsCycleBasedStatemachine
 		implements
+			IGenericAccessStatemachine,
 			IStatemachine {
 
 	public enum State {
 		State1, State2, State3, State4, State5, State6, State9, State7, State8, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[3];
 
@@ -37,7 +42,8 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 	public Test_ParallelRegionsCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(14);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 
 	}
 
@@ -70,12 +76,20 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 		return false;
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {
@@ -86,7 +100,7 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :
@@ -117,7 +131,7 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 			default :
 				break;
 		}
-		//Handle exit of all possible states (of main region) at position 1...
+		//Handle exit of all possible states (of mainRegion) at position 1...
 		switch (stateVector[1]) {
 
 			case State9 :
@@ -133,7 +147,7 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 			default :
 				break;
 		}
-		//Handle exit of all possible states (of main region) at position 2...
+		//Handle exit of all possible states (of mainRegion) at position 2...
 		switch (stateVector[2]) {
 
 			case State7 :

+ 3 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsEventBasedStatemachine.java

@@ -22,6 +22,9 @@ public class Test_ParallelRegionsEventBasedStatemachine
 
 	public Test_ParallelRegionsEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
 	}
 
 	@Override

+ 3 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterface.java

@@ -10,7 +10,9 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_shallowhistory;
 
-public interface DefaultInterface {
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
+
+public interface DefaultInterface extends IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4, Event5, Event6, Event7, Event8,

+ 68 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,68 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_shallowhistory;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_ShallowHistoryCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1() {
+		super.raiseEvent1();
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+	public void raiseEvent6() {
+		super.raiseEvent6();
+		statemachine.runCycle();
+	}
+	public void raiseEvent7() {
+		super.raiseEvent7();
+		statemachine.runCycle();
+	}
+	public void raiseEvent8() {
+		super.raiseEvent8();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 55 - 27
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/DefaultInterfaceImpl.java

@@ -10,31 +10,31 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_shallowhistory;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.ValuedEvent;
 
-public class DefaultInterfaceImpl implements DefaultInterface {
-	private final Event<Events> EventEvent1 = new Event<Events>(Events.Event1,
-			0);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-	private final Event<Events> EventEvent5 = new Event<Events>(Events.Event5,
-			0);
-	private final Event<Events> EventEvent6 = new Event<Events>(Events.Event6,
-			0);
-	private final Event<Events> EventEvent7 = new Event<Events>(Events.Event7,
-			0);
-	private final Event<Events> EventEvent8 = new Event<Events>(Events.Event8,
-			0);
-
-	private Test_ShallowHistoryCycleBasedStatemachine statemachine;
+public class DefaultInterfaceImpl implements IDefaultInterfaceImpl {
+	protected Map<String, Event<Events>> inEventMap;
+
+	protected Test_ShallowHistoryCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_ShallowHistoryCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new Event<Events>(Events.Event1, 0));
+		inEventMap.put("event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("event4", new Event<Events>(Events.Event4, 0));
+		inEventMap.put("event5", new Event<Events>(Events.Event5, 0));
+		inEventMap.put("event6", new Event<Events>(Events.Event6, 0));
+		inEventMap.put("event7", new Event<Events>(Events.Event7, 0));
+		inEventMap.put("event8", new Event<Events>(Events.Event8, 0));
 	}
 
 	public void raiseEvent1() {
@@ -42,7 +42,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent1() {
-		return EventEvent1;
+		return inEventMap.get("event1");
 	}
 
 	public void raiseEvent2() {
@@ -50,7 +50,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("event2");
 	}
 
 	public void raiseEvent3() {
@@ -58,7 +58,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
 	public void raiseEvent4() {
@@ -66,7 +66,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("event4");
 	}
 
 	public void raiseEvent5() {
@@ -74,7 +74,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent5() {
-		return EventEvent5;
+		return inEventMap.get("event5");
 	}
 
 	public void raiseEvent6() {
@@ -82,7 +82,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent6() {
-		return EventEvent6;
+		return inEventMap.get("event6");
 	}
 
 	public void raiseEvent7() {
@@ -90,7 +90,7 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent7() {
-		return EventEvent7;
+		return inEventMap.get("event7");
 	}
 
 	public void raiseEvent8() {
@@ -98,7 +98,35 @@ public class DefaultInterfaceImpl implements DefaultInterface {
 	}
 
 	public Event<Events> getEventEvent8() {
-		return EventEvent8;
+		return inEventMap.get("event8");
+	}
+
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
 	}
 
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return null;
+	}
 }

+ 33 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/IDefaultInterfaceImpl.java

@@ -0,0 +1,33 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_shallowhistory;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public Event<Events> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+	public Event<Events> getEventEvent5();
+
+	public Event<Events> getEventEvent6();
+
+	public Event<Events> getEventEvent7();
+
+	public Event<Events> getEventEvent8();
+
+}

+ 69 - 7
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java

@@ -14,15 +14,22 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 
-public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine {
+public class Test_ShallowHistoryCycleBasedStatemachine
+		implements
+			IGenericAccessStatemachine,
+			IStatemachine {
 
 	public enum State {
 		State1, State2, State3, State4, State6, State7, State8, State9, State5, $NullState$
 	};
 
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private State[] historyVector = new State[2];
 
@@ -37,7 +44,8 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	public Test_ShallowHistoryCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(8);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 
 	}
 
@@ -74,12 +82,20 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 		return false;
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {
@@ -89,7 +105,7 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 	}
 
 	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
+		//Handle exit of all possible states (of mainRegion) at position 0...
 		switch (stateVector[0]) {
 
 			case State1 :
@@ -98,26 +114,40 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 				break;
 
 			case State3 :
+
+				historyVector[0] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State6 :
+
+				historyVector[0] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State8 :
+
+				historyVector[0] = stateVector[0];
+
+				historyVector[1] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State9 :
+
+				historyVector[0] = stateVector[0];
+
+				historyVector[1] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
 
 			case State5 :
+
+				historyVector[0] = stateVector[0];
 				stateVector[0] = State.$NullState$;
 
 				break;
@@ -223,11 +253,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -276,11 +310,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -309,11 +347,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 						break;
 
 					case State8 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -366,11 +408,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -399,11 +445,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 						break;
 
 					case State8 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -474,11 +524,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
@@ -507,11 +561,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 						break;
 
 					case State8 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
 
 					case State9 :
+
+						historyVector[1] = stateVector[0];
 						stateVector[0] = State.$NullState$;
 
 						break;
@@ -582,11 +640,15 @@ public class Test_ShallowHistoryCycleBasedStatemachine implements IStatemachine
 					break;
 
 				case State8 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;
 
 				case State9 :
+
+					historyVector[1] = stateVector[0];
 					stateVector[0] = State.$NullState$;
 
 					break;

+ 3 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryEventBasedStatemachine.java

@@ -22,6 +22,9 @@ public class Test_ShallowHistoryEventBasedStatemachine
 
 	public Test_ShallowHistoryEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
 	}
 
 	@Override

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterface.java

@@ -12,8 +12,12 @@ package org.yakindu.sct.runtime.java.test_transition;
 
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface DefaultInterface extends INotificationSender {
+public interface DefaultInterface
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event5, Event6, Event7,

+ 48 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceEventBasedImpl.java

@@ -0,0 +1,48 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_transition;
+
+public class DefaultInterfaceEventBasedImpl extends DefaultInterfaceImpl {
+
+	public DefaultInterfaceEventBasedImpl(
+			Test_TransitionCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent5(boolean value) {
+		super.raiseEvent5(value);
+		statemachine.runCycle();
+	}
+	public void raiseEvent6() {
+		super.raiseEvent6();
+		statemachine.runCycle();
+	}
+	public void raiseEvent7() {
+		super.raiseEvent7();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 64 - 17
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/DefaultInterfaceImpl.java

@@ -10,6 +10,8 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_transition;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.EventNotification;
@@ -18,19 +20,29 @@ import org.yakindu.sct.runtime.java.ValuedEvent;
 
 public class DefaultInterfaceImpl extends NotificationSender
 		implements
-			DefaultInterface {
-	private final ValuedEvent<Events, Boolean> EventEvent5 = new ValuedEvent<Events, Boolean>(
-			Events.Event5, 5, false);
-	private final Event<Events> EventEvent6 = new Event<Events>(Events.Event6,
-			5);
-	private final Event<Events> EventEvent7 = new Event<Events>(Events.Event7,
-			5);
+			IDefaultInterfaceImpl {
+	protected Map<String, Object> variableMap;
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private Test_TransitionCycleBasedStatemachine statemachine;
+	protected Test_TransitionCycleBasedStatemachine statemachine;
 
 	public DefaultInterfaceImpl(
 			Test_TransitionCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+		variableMap = new HashMap<String, Object>();
+		variableMap.put("i", new Integer(0));
+		variableMap.put("j", new Double(0D));
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		outEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event5", new ValuedEvent<Events, Boolean>(
+				Events.Event5, 5, false));
+		inEventMap.put("event6", new Event<Events>(Events.Event6, 5));
+		outEventMap.put("event7", new Event<Events>(Events.Event7, 5));
 	}
 
 	public void raiseEvent5(boolean value) {
@@ -38,8 +50,9 @@ public class DefaultInterfaceImpl extends NotificationSender
 		statemachine.getOccuredEvents().add(getEventEvent5());
 	}
 
+	@SuppressWarnings("unchecked")
 	public ValuedEvent<Events, Boolean> getEventEvent5() {
-		return EventEvent5;
+		return (ValuedEvent<Events, Boolean>) inEventMap.get("event5");
 	}
 
 	public void raiseEvent6() {
@@ -47,7 +60,7 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent6() {
-		return EventEvent6;
+		return inEventMap.get("event6");
 	}
 
 	public void raiseEvent7() {
@@ -57,34 +70,68 @@ public class DefaultInterfaceImpl extends NotificationSender
 	}
 
 	public Event<Events> getEventEvent7() {
-		return EventEvent7;
+		return outEventMap.get("event7");
 	}
 
 	public boolean isRaisedEvent7() {
 		return statemachine.getOutEvents().contains(getEventEvent7());
 	}
 
-	private int varI;
 	public int getVarI() {
-		return varI;
+		return (Integer) variableMap.get("i");
 	}
 
 	public void setVarI(int value) {
 		int oldValue = getVarI();
-		varI = value;
+		variableMap.put("i", new Integer(value));
 		notifyListeners(new VariableNotification<Integer>(Variables.i,
 				getVarI(), oldValue));
 	}
-	private double varJ;
 	public double getVarJ() {
-		return varJ;
+		return (Double) variableMap.get("j");
 	}
 
 	public void setVarJ(double value) {
 		double oldValue = getVarJ();
-		varJ = value;
+		variableMap.put("j", new Double(value));
 		notifyListeners(new VariableNotification<Double>(Variables.j,
 				getVarJ(), oldValue));
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		if (variableMap.get(name) != null
+				&& variableMap.get(name).getClass() == value.getClass()) {
+			Object oldValue = variableMap.get(name);
+			variableMap.put(name, value);
+			notifyListeners(new VariableNotification<Object>(
+					Variables.valueOf(name), variableMap.get(name), oldValue));
+			return true;
+		}
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return variableMap.get(name);
+	}
 }

+ 24 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/IDefaultInterfaceImpl.java

@@ -0,0 +1,24 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_transition;
+
+import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+
+public interface IDefaultInterfaceImpl extends DefaultInterface {
+
+	public ValuedEvent<Events, Boolean> getEventEvent5();
+
+	public Event<Events> getEventEvent6();
+
+	public void raiseEvent7();
+
+}

+ 28 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/IInterfaceAImpl.java

@@ -0,0 +1,28 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_transition;
+
+import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+
+public interface IInterfaceAImpl extends InterfaceA {
+
+	public ValuedEvent<Events, Integer> getEventEvent1();
+
+	public Event<Events> getEventEvent2();
+
+	public Event<Events> getEventEvent3();
+
+	public Event<Events> getEventEvent4();
+
+	public void raiseEvent5();
+
+}

+ 5 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceA.java

@@ -12,8 +12,12 @@ package org.yakindu.sct.runtime.java.test_transition;
 
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.INotificationSender;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 
-public interface InterfaceA extends INotificationSender {
+public interface InterfaceA
+		extends
+			INotificationSender,
+			IGenericAccessInterface {
 
 	public enum Events {
 		Event1, Event2, Event3, Event4, Event5,

+ 56 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAEventBasedImpl.java

@@ -0,0 +1,56 @@
+/**
+Copyright (c) 2011 committers of YAKINDU and others. 
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ 
+Contributors:
+	committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.runtime.java.test_transition;
+
+public class InterfaceAEventBasedImpl extends InterfaceAImpl {
+
+	public InterfaceAEventBasedImpl(
+			Test_TransitionCycleBasedStatemachine statemachine) {
+		super(statemachine);
+	}
+
+	public void raiseEvent1(int value) {
+		super.raiseEvent1(value);
+		statemachine.runCycle();
+	}
+	public void raiseEvent2() {
+		super.raiseEvent2();
+		statemachine.runCycle();
+	}
+	public void raiseEvent3() {
+		super.raiseEvent3();
+		statemachine.runCycle();
+	}
+	public void raiseEvent4() {
+		super.raiseEvent4();
+		statemachine.runCycle();
+	}
+	public void raiseEvent5() {
+		super.raiseEvent5();
+		statemachine.runCycle();
+	}
+
+	public boolean raiseEvent(String name) {
+		boolean raised = super.raiseEvent(name);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+
+	public boolean raiseEvent(String name, Object value) {
+		boolean raised = super.raiseEvent(name, value);
+		if (raised) {
+			statemachine.runCycle();
+		}
+		return raised;
+	}
+}

+ 54 - 17
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/InterfaceAImpl.java

@@ -10,27 +10,35 @@ Contributors:
  */
 package org.yakindu.sct.runtime.java.test_transition;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.NotificationSender;
 import org.yakindu.sct.runtime.java.EventNotification;
 import org.yakindu.sct.runtime.java.ValuedEvent;
 
-public class InterfaceAImpl extends NotificationSender implements InterfaceA {
-	private final ValuedEvent<Events, Integer> EventEvent1 = new ValuedEvent<Events, Integer>(
-			Events.Event1, 0, 1);
-	private final Event<Events> EventEvent2 = new Event<Events>(Events.Event2,
-			0);
-	private final Event<Events> EventEvent3 = new Event<Events>(Events.Event3,
-			0);
-	private final Event<Events> EventEvent4 = new Event<Events>(Events.Event4,
-			0);
-	private final Event<Events> EventEvent5 = new Event<Events>(Events.Event5,
-			0);
+public class InterfaceAImpl extends NotificationSender
+		implements
+			IInterfaceAImpl {
+	protected Map<String, Event<Events>> outEventMap;
+	protected Map<String, Event<Events>> inEventMap;
 
-	private Test_TransitionCycleBasedStatemachine statemachine;
+	protected Test_TransitionCycleBasedStatemachine statemachine;
 
 	public InterfaceAImpl(Test_TransitionCycleBasedStatemachine statemachine) {
+
 		this.statemachine = statemachine;
+
+		inEventMap = new HashMap<String, Event<Events>>();
+
+		outEventMap = new HashMap<String, Event<Events>>();
+
+		inEventMap.put("event1", new ValuedEvent<Events, Integer>(
+				Events.Event1, 0, 1));
+		inEventMap.put("event2", new Event<Events>(Events.Event2, 0));
+		inEventMap.put("event3", new Event<Events>(Events.Event3, 0));
+		inEventMap.put("event4", new Event<Events>(Events.Event4, 0));
+		outEventMap.put("event5", new Event<Events>(Events.Event5, 0));
 	}
 
 	public void raiseEvent1(int value) {
@@ -38,8 +46,9 @@ public class InterfaceAImpl extends NotificationSender implements InterfaceA {
 		statemachine.getOccuredEvents().add(getEventEvent1());
 	}
 
+	@SuppressWarnings("unchecked")
 	public ValuedEvent<Events, Integer> getEventEvent1() {
-		return EventEvent1;
+		return (ValuedEvent<Events, Integer>) inEventMap.get("event1");
 	}
 
 	public void raiseEvent2() {
@@ -47,7 +56,7 @@ public class InterfaceAImpl extends NotificationSender implements InterfaceA {
 	}
 
 	public Event<Events> getEventEvent2() {
-		return EventEvent2;
+		return inEventMap.get("event2");
 	}
 
 	public void raiseEvent3() {
@@ -55,7 +64,7 @@ public class InterfaceAImpl extends NotificationSender implements InterfaceA {
 	}
 
 	public Event<Events> getEventEvent3() {
-		return EventEvent3;
+		return inEventMap.get("event3");
 	}
 
 	public void raiseEvent4() {
@@ -63,7 +72,7 @@ public class InterfaceAImpl extends NotificationSender implements InterfaceA {
 	}
 
 	public Event<Events> getEventEvent4() {
-		return EventEvent4;
+		return inEventMap.get("event4");
 	}
 
 	public void raiseEvent5() {
@@ -73,11 +82,39 @@ public class InterfaceAImpl extends NotificationSender implements InterfaceA {
 	}
 
 	public Event<Events> getEventEvent5() {
-		return EventEvent5;
+		return outEventMap.get("event5");
 	}
 
 	public boolean isRaisedEvent5() {
 		return statemachine.getOutEvents().contains(getEventEvent5());
 	}
 
+	public boolean raiseEvent(String name) {
+		if (inEventMap.get(name) != null) {
+			return statemachine.getOccuredEvents().add(inEventMap.get(name));
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		if (inEventMap.get(name) != null
+				&& inEventMap.get(name) instanceof ValuedEvent) {
+			ValuedEvent<?, ?> event = (ValuedEvent<?, ?>) inEventMap.get(name);
+			if (event.getValue().getClass() == value.getClass()) {
+				((ValuedEvent<Events, Object>) event).setValue(value);
+				return statemachine.getOccuredEvents()
+						.add(inEventMap.get(name));
+			}
+		}
+		return false;
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return false;
+	}
+
+	public Object getVariable(String name) {
+		return null;
+	}
 }

+ 23 - 10
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java

@@ -14,6 +14,10 @@ import java.util.Collection;
 import java.util.HashSet;
 import org.yakindu.sct.runtime.java.Event;
 import org.yakindu.sct.runtime.java.EventVector;
+import java.util.HashMap;
+import java.util.Map;
+import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
+import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimerService;
@@ -22,6 +26,7 @@ import org.yakindu.sct.runtime.java.Notification;
 
 public class Test_TransitionCycleBasedStatemachine
 		implements
+			IGenericAccessStatemachine,
 			ITimedStatemachine {
 
 	private enum TimeEvents {
@@ -37,8 +42,7 @@ public class Test_TransitionCycleBasedStatemachine
 		State1, State2, $NullState$
 	};
 
-	private InterfaceAImpl interfaceA;
-	private DefaultInterfaceImpl defaultInterface;
+	protected Map<String, IGenericAccessInterface> interfaceMap;
 
 	private final State[] stateVector = new State[1];
 
@@ -55,8 +59,9 @@ public class Test_TransitionCycleBasedStatemachine
 	public Test_TransitionCycleBasedStatemachine() {
 		occuredEvents = new EventVector<Event<? extends Enum<?>>>(10);
 		outEvents = new HashSet<Event<? extends Enum<?>>>();
-		interfaceA = new InterfaceAImpl(this);
-		defaultInterface = new DefaultInterfaceImpl(this);
+		interfaceMap = new HashMap<String, IGenericAccessInterface>();
+		interfaceMap.put("InterfaceA", new InterfaceAImpl(this));
+		interfaceMap.put("DefaultInterface", new DefaultInterfaceImpl(this));
 		State1_time_event_0.setStatemachine(this);
 		State1_time_event_1.setStatemachine(this);
 
@@ -110,19 +115,27 @@ public class Test_TransitionCycleBasedStatemachine
 		}
 	}
 
+	public IGenericAccessInterface getInterface(String name) {
+		return interfaceMap.get(name);
+	}
+
+	protected Map<String, IGenericAccessInterface> getInterfaceMap() {
+		return interfaceMap;
+	}
+
 	public InterfaceA getInterfaceA() {
-		return interfaceA;
+		return (InterfaceA) getInterface("InterfaceA");
 	}
 
-	private InterfaceAImpl getInterfaceAImpl() {
-		return interfaceA;
+	protected IInterfaceAImpl getInterfaceAImpl() {
+		return (IInterfaceAImpl) getInterface("InterfaceA");
 	}
 	public DefaultInterface getDefaultInterface() {
-		return defaultInterface;
+		return (DefaultInterface) getInterface("DefaultInterface");
 	}
 
-	private DefaultInterfaceImpl getDefaultInterfaceImpl() {
-		return defaultInterface;
+	protected IDefaultInterfaceImpl getDefaultInterfaceImpl() {
+		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 
 	public void enter() {

+ 11 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionEventBasedStatemachine.java

@@ -14,6 +14,8 @@ import java.util.LinkedList;
 
 import org.yakindu.sct.runtime.java.Event;
 
+import org.yakindu.sct.runtime.java.Notification;
+
 public class Test_TransitionEventBasedStatemachine
 		extends
 			Test_TransitionCycleBasedStatemachine {
@@ -22,6 +24,15 @@ public class Test_TransitionEventBasedStatemachine
 
 	public Test_TransitionEventBasedStatemachine() {
 		eventQueue = new LinkedList<Event<? extends Enum<?>>>();
+		//Replace interface map entries of cycle based statemachine super class
+		getInterfaceMap().put("InterfaceA", new InterfaceAEventBasedImpl(this));
+		getInterfaceMap().put("DefaultInterface",
+				new DefaultInterfaceEventBasedImpl(this));
+	}
+
+	public void notify(Notification notification) {
+		super.notify(notification);
+		runCycle();
 	}
 
 	@Override

+ 1 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryCycleBasedStatemachine.java

@@ -6,8 +6,8 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.test_deephistory.Test_DeepHistoryCycleBasedStatemachine;
 import org.yakindu.sct.runtime.java.test_deephistory.DefaultInterface;
+import org.yakindu.sct.runtime.java.test_deephistory.Test_DeepHistoryCycleBasedStatemachine;
 import org.yakindu.sct.runtime.java.test_deephistory.Test_DeepHistoryCycleBasedStatemachine.State;
 
 public class TestDeepHistoryCycleBasedStatemachine {

+ 1 - 12
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryEventBasedStatemachine.java

@@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.test_deephistory.DefaultInterface;
 import org.yakindu.sct.runtime.java.test_deephistory.Test_DeepHistoryCycleBasedStatemachine.State;
 import org.yakindu.sct.runtime.java.test_deephistory.Test_DeepHistoryEventBasedStatemachine;
@@ -17,11 +16,6 @@ public class TestDeepHistoryEventBasedStatemachine {
 
 	private DefaultInterface dInterface;
 
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
-
 	@Before
 	public void setUp() {
 		statemachine = new Test_DeepHistoryEventBasedStatemachine();
@@ -29,8 +23,6 @@ public class TestDeepHistoryEventBasedStatemachine {
 		statemachine.enter();
 		dInterface = statemachine.getDefaultInterface();
 		dInterface = statemachine.getDefaultInterface();
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
@@ -39,25 +31,22 @@ public class TestDeepHistoryEventBasedStatemachine {
 	}
 
 	@Test
-	public void testDeepHistory() throws InterruptedException {
+	public void testDeepHistory() {
 		// Change active states to State9;
 		dInterface.raiseEvent1();
 		dInterface.raiseEvent3();
 		dInterface.raiseEvent5();
 		dInterface.raiseEvent7();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 		// Leave State2. State4 and State9 should be saved as history.
 		dInterface.raiseEvent2();
-		Thread.sleep(5);
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State9));
 
 		// Reenter State2. State9 should be activated (History of State2).
 		dInterface.raiseEvent1();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 	}

+ 0 - 44
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionEventBasedStatemachine.java

@@ -5,61 +5,22 @@ import static org.junit.Assert.assertEquals;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.INotificationListener;
-import org.yakindu.sct.runtime.java.Notification;
-import org.yakindu.sct.runtime.java.NotificationType;
-import org.yakindu.sct.runtime.java.RuntimeCycleNotification;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.test_expression.Test_ExpressionEventBasedStatemachine;
 
 public class TestExpressionEventBasedStatemachine {
 
 	private Test_ExpressionEventBasedStatemachine statemachine;
 
-	private RuntimeService runtimeService;
-
-	private boolean shouldWait;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
-
 	@Before
 	public void setUp() {
 		statemachine = new Test_ExpressionEventBasedStatemachine();
 		statemachine.init();
 		statemachine.enter();
-		shouldWait = true;
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addNotificationListener(new INotificationListener() {
-			public void notify(Notification notification) {
-				if (notification.getNotificationType() == NotificationType.RuntimeCycleNotification
-						&& ((RuntimeCycleNotification)notification).getStatemachine() == statemachine) {
-					shouldWait = false;
-				}
-			}
-		});
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
 	public void tearDown() {
-		runtimeService.removeStatemachine(statemachine);
-		runtimeService.cancel();
 		statemachine = null;
-		shouldWait = false;
-	}
-
-	private void sleep() {
-
-		while (shouldWait) {
-			try {
-				Thread.sleep(1);
-			} catch (InterruptedException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-		shouldWait = true;
 	}
 
 	@Test
@@ -68,7 +29,6 @@ public class TestExpressionEventBasedStatemachine {
 				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
 
 		statemachine.getDefaultInterface().raiseEvent1(0);
-		sleep();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
@@ -82,7 +42,6 @@ public class TestExpressionEventBasedStatemachine {
 
 		// Trigger oncycle expression with event
 		statemachine.getDefaultInterface().raiseEvent3();
-		sleep();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
@@ -96,7 +55,6 @@ public class TestExpressionEventBasedStatemachine {
 
 		// Trigger oncycle expression with event
 		statemachine.getDefaultInterface().raiseEvent3();
-		sleep();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
@@ -109,14 +67,12 @@ public class TestExpressionEventBasedStatemachine {
 				.getDefaultInterface().getVarVar1());
 
 		statemachine.getDefaultInterface().raiseEvent1(0);
-		sleep();
 		assertEquals("Default.Var5 value not set correct: ", true, statemachine
 				.getDefaultInterface().getVarVar5());
 		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
 				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
 
 		statemachine.getDefaultInterface().raiseEvent1(0);
-		sleep();
 		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
 				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
 

+ 0 - 31
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyEventBasedStatemachine.java

@@ -15,7 +15,6 @@ import static org.junit.Assert.assertEquals;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.test_hierarchy.Test_HierarchyEventBasedStatemachine;
 
 /**
@@ -27,36 +26,19 @@ import org.yakindu.sct.runtime.java.test_hierarchy.Test_HierarchyEventBasedState
 public class TestHierarchyEventBasedStatemachine {
 
 	private Test_HierarchyEventBasedStatemachine statemachine;
-	
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
 
 	@Before
 	public void setUp() {
 		statemachine = new Test_HierarchyEventBasedStatemachine();
 		statemachine.init();
 		statemachine.enter();
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
 	public void tearDown() {
-		runtimeService.removeStatemachine(statemachine);
-		runtimeService.cancel();
 		statemachine = null;
 	}
 
-	private void sleep(long time) {
-		try {
-			Thread.sleep(time);
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-		}
-	}
-
 	@Test
 	public void testState1() {
 		assertEquals("s1 value not set correct: ", 2, statemachine
@@ -65,28 +47,24 @@ public class TestHierarchyEventBasedStatemachine {
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent9();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent10();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent1();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent14();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine
@@ -94,14 +72,12 @@ public class TestHierarchyEventBasedStatemachine {
 
 		statemachine.getDefaultInterface().raiseEvent1();
 		statemachine.getDefaultInterface().raiseEvent2();
-		sleep(4);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 3, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent15();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine
@@ -110,21 +86,18 @@ public class TestHierarchyEventBasedStatemachine {
 		statemachine.getDefaultInterface().raiseEvent1();
 		statemachine.getDefaultInterface().raiseEvent2();
 		statemachine.getDefaultInterface().raiseEvent3();
-		sleep(6);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 4, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent4();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 4, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent16();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine
@@ -135,28 +108,24 @@ public class TestHierarchyEventBasedStatemachine {
 		statemachine.getDefaultInterface().raiseEvent3();
 		statemachine.getDefaultInterface().raiseEvent4();
 		statemachine.getDefaultInterface().raiseEvent5();
-		sleep(10);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 4, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent8();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 3, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent7();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 0, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS2());
 
 		statemachine.getDefaultInterface().raiseEvent6();
-		sleep(2);
 		assertEquals("s1 value not set correct: ", 2, statemachine
 				.getDefaultInterface().getVarS1());
 		assertEquals("s2 value not set correct: ", 0, statemachine

+ 0 - 28
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java

@@ -21,7 +21,6 @@ import org.yakindu.sct.runtime.java.EventNotification;
 import org.yakindu.sct.runtime.java.INotificationListener;
 import org.yakindu.sct.runtime.java.Notification;
 import org.yakindu.sct.runtime.java.NotificationType;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.interfacetest.InterfaceTestCycleBasedStatemachine.State;
 import org.yakindu.sct.runtime.java.interfacetest.InterfaceTestEventBasedStatemachine;
 
@@ -35,11 +34,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 
 	private InterfaceTestEventBasedStatemachine statemachine;
 
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
-
 	private static boolean[] events = new boolean[3];
 
 	@Before
@@ -85,25 +79,13 @@ public class TestInterfaceTestEventBasedStatemachine {
 				});
 		statemachine.init();
 		statemachine.enter();
-
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
 	public void tearDown() {
-		runtimeService.cancel();
 		statemachine = null;
 	}
 
-	private void sleep(long time) {
-		try {
-			Thread.sleep(time);
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-		}
-	}
-
 	@Test (expected = IllegalArgumentException.class)
 	public void testExceptionHandling() {
 		// Value of Event 2 should not be set to null
@@ -126,7 +108,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 	public void testStatemachineRunCycle_1() {
 
 		statemachine.getDefaultInterface().raiseEvent1();
-		sleep(5);
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
@@ -137,7 +118,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 				.getDefaultInterface().getEventEvent2().getValue().intValue());
 
 		statemachine.getDefaultInterface().raiseEvent1();
-		sleep(5);
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
@@ -150,7 +130,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 	public void testStatemachineRunCycle_2() {
 		statemachine.getDefaultInterface().setVarVar2(-12.6);
 		statemachine.getDefaultInterface().raiseEvent1();
-		sleep(5);
 		// Test if statemachine is still in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
@@ -163,7 +142,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 
 		statemachine.getDefaultInterface().setVarVar2(213.55);
 		statemachine.getDefaultInterface().raiseEvent1();
-		sleep(2);
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
@@ -177,7 +155,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 	@Test
 	public void testStatemachineRunCycle_3() {
 		statemachine.getInterfaceOther().raiseEvent3();
-		sleep(5);
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
 				statemachine.isStateActive(State.State3));
@@ -185,7 +162,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 		assertTrue("Event not raised: ", events[1]);
 
 		statemachine.getInterfaceOther().raiseEvent3();
-		sleep(5);
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
@@ -198,7 +174,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 	public void testStatemachineRunCycle_4() {
 		statemachine.getDefaultInterface().setVarVar3(2);
 		statemachine.getInterfaceOther().raiseEvent3();
-		sleep(2);
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
@@ -207,7 +182,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 
 		statemachine.getDefaultInterface().setVarVar3(1);
 		statemachine.getInterfaceOther().raiseEvent3();
-		sleep(2);
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
 				statemachine.isStateActive(State.State3));
@@ -219,7 +193,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 	public void testStatemachineRunCycle_5() {
 		statemachine.getDefaultInterface().setVarVar1(true);
 		statemachine.getInterfaceThird().raiseEvent5();
-		sleep(2);
 		// Test if state is changed to State4
 		assertTrue("Statemachine isn't in State: " + State.State4.name() + ".",
 				statemachine.isStateActive(State.State4));
@@ -230,7 +203,6 @@ public class TestInterfaceTestEventBasedStatemachine {
 				.getEventEvent6().getValue());
 
 		statemachine.getInterfaceThird().raiseEvent5();
-		sleep(2);
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));

+ 0 - 15
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java

@@ -16,7 +16,6 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.TimerService;
 import org.yakindu.sct.runtime.java.test_localactions.Test_LocalActionsCycleBasedStatemachine;
 import org.yakindu.sct.runtime.java.test_localactions.Test_LocalActionsCycleBasedStatemachine.State;
@@ -41,24 +40,16 @@ public class TestLocalActionsEventBasedStatemachine {
 	// within the timerThreshold time.
 	private final long junitSleepTime = 1;
 
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
-
 	@Before
 	public void setUp() {
 		statemachine = new Test_LocalActionsEventBasedStatemachine();
 		statemachine.setTimerService(new TimerService());
 		statemachine.init();
 		statemachine.enter();
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
 	public void tearDown() {
-		runtimeService.cancel();
 		statemachine.getTimerService().cancel();
 		statemachine = null;
 	}
@@ -85,12 +76,10 @@ public class TestLocalActionsEventBasedStatemachine {
 				statemachine.getDefaultInterface().getVarI());
 
 		statemachine.getDefaultInterface().raiseEvent3();
-		Thread.sleep(5);
 		assertEquals("Error in local reaction \"onCycle / i=2;\" of State1", 2,
 				statemachine.getDefaultInterface().getVarI());
 
 		statemachine.getDefaultInterface().raiseEvent2();
-		Thread.sleep(5);
 		assertEquals("Error in local reaction \"Event2 / i=3;\" of State1", 3,
 				statemachine.getDefaultInterface().getVarI());
 
@@ -110,7 +99,6 @@ public class TestLocalActionsEventBasedStatemachine {
 	public void testState2LocalReaction() throws InterruptedException {
 		// Switch to State2;
 		statemachine.getDefaultInterface().raiseEvent1();
-		Thread.sleep(5);
 		final long time = System.currentTimeMillis();
 
 		assertEquals("Error in local reaction \"exit / i=0;\" of State1", 0,
@@ -121,7 +109,6 @@ public class TestLocalActionsEventBasedStatemachine {
 
 		// Check local reaction for Event2
 		statemachine.getDefaultInterface().raiseEvent2();
-		Thread.sleep(5);
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				2, statemachine.getDefaultInterface().getVarJ());
@@ -140,14 +127,12 @@ public class TestLocalActionsEventBasedStatemachine {
 
 		// Check local reaction for Event4
 		statemachine.getDefaultInterface().raiseEvent4();
-		Thread.sleep(5);
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				2, statemachine.getDefaultInterface().getVarJ());
 
 		// Check local reaction for exit
 		statemachine.getDefaultInterface().raiseEvent3();
-		Thread.sleep(5);
 		assertEquals("Error in local reaction \"exit / j=0;\" of State2", 0,
 				statemachine.getDefaultInterface().getVarJ());
 	}

+ 3 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java

@@ -10,7 +10,9 @@
  */
 package org.yakindu.sct.generator.java.runtime.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.junit.After;
 import org.junit.Before;

+ 0 - 24
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsEventBasedStatemachine.java

@@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.test_parallelregions.DefaultInterface;
 import org.yakindu.sct.runtime.java.test_parallelregions.Test_ParallelRegionsCycleBasedStatemachine.State;
 import org.yakindu.sct.runtime.java.test_parallelregions.Test_ParallelRegionsEventBasedStatemachine;
@@ -31,19 +30,12 @@ import org.yakindu.sct.runtime.java.test_parallelregions.Test_ParallelRegionsEve
 public class TestParallelRegionsEventBasedStatemachine {
 
 	private Test_ParallelRegionsEventBasedStatemachine sm;
-	
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
 
 	@Before
 	public void setUp() {
 		sm = new Test_ParallelRegionsEventBasedStatemachine();
 		sm.init();
 		sm.enter();
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(sm);
 	}
 
 	@After
@@ -60,27 +52,23 @@ public class TestParallelRegionsEventBasedStatemachine {
 	@Test
 	public void testStatemachineHierarchyLevelOne() throws InterruptedException {
 		sm.getDefaultInterface().raiseEvent1();
-		Thread.sleep(5);
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 
 		sm.getDefaultInterface().raiseEvent5();
-		Thread.sleep(5);
 		// Test if state is changed to State3 && State8
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State7));
 
 		sm.getDefaultInterface().raiseEvent6();
-		Thread.sleep(5);
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State8));
 
 		sm.getDefaultInterface().raiseEvent3();
-		Thread.sleep(5);
 		// Test if state is back to State1
 		assertTrue(sm.isStateActive(State.State1));
 		assertFalse(sm.isStateActive(State.State3));
@@ -91,20 +79,17 @@ public class TestParallelRegionsEventBasedStatemachine {
 	@Test
 	public void testStatemachineHierarchyLevelTwo() throws InterruptedException {
 		sm.getDefaultInterface().raiseEvent1();
-		Thread.sleep(5);
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 
 		sm.getDefaultInterface().raiseEvent2();
-		Thread.sleep(5);
 		// Test if state is changed to State9, State5 and State7
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State5));
 		assertTrue(sm.isStateActive(State.State7));
 
 		sm.getDefaultInterface().raiseEvent3();
-		Thread.sleep(5);
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State6));
@@ -112,7 +97,6 @@ public class TestParallelRegionsEventBasedStatemachine {
 		assertTrue(sm.isStateActive(State.State8));
 
 		sm.getDefaultInterface().raiseEvent6();
-		Thread.sleep(5);
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State6));
@@ -125,7 +109,6 @@ public class TestParallelRegionsEventBasedStatemachine {
 		DefaultInterface di = sm.getDefaultInterface();
 
 		di.raiseEvent1();
-		Thread.sleep(5);
 		// Exit State1
 		int hierarchy = 2;
 		// Entry State2
@@ -134,25 +117,20 @@ public class TestParallelRegionsEventBasedStatemachine {
 		assertEquals(hierarchy, di.getVarHierarchy());
 
 		di.raiseEvent5();
-		Thread.sleep(5);
 		assertEquals(8, di.getVarReg3());
 
 		di.raiseEvent6();
-		Thread.sleep(5);
 		di.raiseEvent3();
-		Thread.sleep(5);
 		// Exit State1
 		hierarchy = 2;
 		assertEquals(-1, di.getVarReg3());
 		assertEquals(hierarchy, di.getVarHierarchy());
 
 		di.raiseEvent1();
-		Thread.sleep(5);
 		// Entry State2
 		hierarchy += 3;
 
 		di.raiseEvent2();
-		Thread.sleep(5);
 		// Entry State4
 		hierarchy *= 4;
 		// Entry State9
@@ -162,7 +140,6 @@ public class TestParallelRegionsEventBasedStatemachine {
 		assertEquals(hierarchy, di.getVarHierarchy());
 
 		di.raiseEvent8();
-		Thread.sleep(5);
 		// Exit State9
 		hierarchy -= 10;
 		// Exit State5
@@ -175,7 +152,6 @@ public class TestParallelRegionsEventBasedStatemachine {
 
 		//Jump to State6 && State9
 		di.raiseEvent11();
-		Thread.sleep(5);
 		// Exit State1
 		hierarchy = 2;
 		// Entry State2

+ 1 - 15
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryEventBasedStatemachine.java

@@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.yakindu.sct.runtime.java.RuntimeService;
 import org.yakindu.sct.runtime.java.test_shallowhistory.DefaultInterface;
 import org.yakindu.sct.runtime.java.test_shallowhistory.Test_ShallowHistoryCycleBasedStatemachine.State;
 import org.yakindu.sct.runtime.java.test_shallowhistory.Test_ShallowHistoryEventBasedStatemachine;
@@ -16,11 +15,6 @@ public class TestShallowHistoryEventBasedStatemachine {
 	private Test_ShallowHistoryEventBasedStatemachine statemachine;
 
 	private DefaultInterface dInterface;
-	
-	private RuntimeService runtimeService;
-
-	// Minimal cycletime
-	private final long cyclePeriod = 1;
 
 	@Before
 	public void setUp() {
@@ -28,8 +22,6 @@ public class TestShallowHistoryEventBasedStatemachine {
 		statemachine.init();
 		statemachine.enter();
 		dInterface = statemachine.getDefaultInterface();
-		runtimeService = new RuntimeService(cyclePeriod);
-		runtimeService.addStatemachine(statemachine);
 	}
 
 	@After
@@ -38,43 +30,37 @@ public class TestShallowHistoryEventBasedStatemachine {
 	}
 
 	@Test
-	public void testShallowHistory() throws InterruptedException {
+	public void testShallowHistory() {
 		// Change active states to State9;
 		dInterface.raiseEvent1();
 		dInterface.raiseEvent3();
 		dInterface.raiseEvent5();
 		dInterface.raiseEvent7();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 		// Leave State7. State9 should be saved as history.
 		dInterface.raiseEvent6();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State6));
 
 		// Reenter State7. State9 should be activated because of saved history.
 		dInterface.raiseEvent5();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 		// Leave State2. State4 and State9 should be saved as history.
 		dInterface.raiseEvent2();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State1));
 
 		// Reenter State2. State6 should be activated (History of State2).
 		dInterface.raiseEvent1();
-		Thread.sleep(5);
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State1));
 
 		// Reenter State7. State9 should be activated (History of State7).
 		dInterface.raiseEvent5();
-		Thread.sleep(5);
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 	}