@@ -19,23 +19,10 @@ public enum States {
1919 }
2020
2121 public enum Events {
22- E_S1_SE , E_S1_1__S1_2 , E_S1_S1 , E_S1_S2 , E_SI_S1
22+ E_S1_SE , E_S1_1__S1_2 , E_S1_S1 , E_S1_S2 , E_S31__S3F , E_S2__SE , E_S3I__S31 , E_S21_S21 , E_S21_S2F , E_S2I_S21 , E_SI_S1
2323
2424 }
2525
26- public StateMachine <String , String > buildUmlMachine (String aPath ) throws Exception {
27- StateMachineBuilder .Builder <String , String > builder = StateMachineBuilder .builder ();
28-
29- builder .configureModel ().withModel ().factory (new UmlStateMachineModelFactory (
30- aPath
31- ));
32- builder .configureConfiguration ()
33- .withConfiguration ()
34- .taskExecutor (new SyncTaskExecutor ())
35- ;
36- return builder .build ();
37- }
38-
3926 public StateMachine <SMHierarch1 .States , SMHierarch1 .Events > buildMachine () throws Exception {
4027 StateMachineBuilder .Builder <SMHierarch1 .States , SMHierarch1 .Events > builder = StateMachineBuilder .builder ();
4128
@@ -91,6 +78,7 @@ public StateMachine<SMHierarch1.States, SMHierarch1.Events> buildRegionMachine()
9178 .withStates ()
9279 .initial (States .S1 )
9380 .state (States .S2 )
81+ .end (States .SE )
9482 .and ()
9583 .withStates ()
9684 .parent (States .S2 )
@@ -112,23 +100,27 @@ public StateMachine<SMHierarch1.States, SMHierarch1.Events> buildRegionMachine()
112100 .and ()
113101 .withExternal ()
114102 .source (States .S2I ).target (States .S21 )
115- .event (Events .E_S1_S1 )
103+ .event (Events .E_S2I_S21 )
116104 .and ()
117105 .withExternal ()
118106 .source (States .S21 ).target (States .S2F )
119- .event (Events .E_S1_SE )
107+ .event (Events .E_S21_S2F )
120108 .and ()
121109 .withInternal ()
122110 .source (States .S21 )
123- .event (Events .E_S1_S1 )
111+ .event (Events .E_S21_S21 )
124112 .and ()
125113 .withExternal ()
126114 .source (States .S3I ).target (States .S31 )
127- .event (Events .E_S1_1__S1_2 )
115+ .event (Events .E_S3I__S31 )
116+ .and ()
117+ .withExternal ()
118+ .source (States .S2 ).target (States .SE )
119+ .event (Events .E_S2__SE )
128120 .and ()
129121 .withExternal ()
130122 .source (States .S31 ).target (States .S3F )
131- .event (Events .E_S1_1__S1_2 )
123+ .event (Events .E_S31__S3F )
132124 .and ()
133125 .withInternal ()
134126 .source (States .S31 )
@@ -137,4 +129,17 @@ public StateMachine<SMHierarch1.States, SMHierarch1.Events> buildRegionMachine()
137129
138130 return builder .build ();
139131 }
132+
133+ public StateMachine <String , String > buildUmlMachine (String aPath ) throws Exception {
134+ StateMachineBuilder .Builder <String , String > builder = StateMachineBuilder .builder ();
135+
136+ builder .configureModel ().withModel ().factory (new UmlStateMachineModelFactory (
137+ aPath
138+ ));
139+ builder .configureConfiguration ()
140+ .withConfiguration ()
141+ .taskExecutor (new SyncTaskExecutor ())
142+ ;
143+ return builder .build ();
144+ }
140145}
0 commit comments