diff --git a/generator/src/generator/ScxmlModel.egl b/generator/src/generator/ScxmlModel.egl index 930abda..223d245 100644 --- a/generator/src/generator/ScxmlModel.egl +++ b/generator/src/generator/ScxmlModel.egl @@ -52,17 +52,18 @@ operation t_state getModel(sm : Tuple) : Tuple { } result.transitions = new List(); - for (transition in self.c_transition.sortBy(t | t.getSortKey())) { - transition.getModel(sm, result, result.transitions); + for (transition in self.c_transition.sortBy(t | t.getSortKey())) { + var t = transition.getModel(); + t.start = result.name; + result.transitions.add(t); } return result; } -operation t_transition getModel(sm : Tuple, state : Tuple, transitions : List) : Tuple { +operation t_transition getModel() : Tuple { var result = new Tuple(); - result.start = state.name; result.target = self.a_target; result.internal = (self.a_type = "internal"); result.trigger = self.a_event; @@ -77,7 +78,7 @@ operation t_transition getModel(sm : Tuple, state : Tuple, transitions : List) : result.guards.add(self.a_cond); } - transitions.add(result); + return result; } operation t_transition getSortKey() : String {