|
@@ -208,13 +208,15 @@ Element function execute_transition(model : Element, data : Element, class : Str
|
|
|
source_states = expand_current_state(model, readAssociationSource(model, transition), data["classes"][class]["states"])
|
|
|
target_states = expand_initial_state(model, readAssociationDestination(model, transition))
|
|
|
|
|
|
+ log("Source state expanded to: " + set_to_string(source_states))
|
|
|
+ log("Target state expanded to: " + set_to_string(target_states))
|
|
|
+
|
|
|
// Do all required operations
|
|
|
Element actions
|
|
|
actions = get_actions_to_execute(model, source_states, target_states)
|
|
|
while (read_nr_out(actions) > 0):
|
|
|
Element action
|
|
|
action = list_pop(actions, 0)
|
|
|
- action = get_func_AL_model(import_node(action))
|
|
|
action(data["attributes"])
|
|
|
|
|
|
return target_states!
|
|
@@ -384,8 +386,10 @@ Element function get_actions_to_execute(model : Element, source_states : Element
|
|
|
break!
|
|
|
|
|
|
// i-th element equal for all hierarchies, so go to next element
|
|
|
- i = i + 1
|
|
|
+ if (bool_not(finished)):
|
|
|
+ i = i + 1
|
|
|
|
|
|
+ log("Found difference at i = " + cast_v2s(i))
|
|
|
// Found the first differing element at position i
|
|
|
|
|
|
// All elements remaining in hierarchy_source are to be traversed in REVERSE order for the exit actions
|
|
@@ -414,10 +418,10 @@ Element function get_actions_to_execute(model : Element, source_states : Element
|
|
|
// Prepend, instead of append, as we want to do these operations in reverse order!
|
|
|
|
|
|
// First check if there is any exit action at all
|
|
|
- action = read_attribute(model, state, "exit_action")
|
|
|
+ action = read_attribute(model, state, "onExitScript")
|
|
|
if (element_neq(action, read_root())):
|
|
|
// An exit action is found!
|
|
|
- list_insert(result, 0, get_func_AL_model(import_node(action)))
|
|
|
+ list_insert(result, get_func_AL_model(import_node(action)), 0)
|
|
|
|
|
|
// Add this state as visited, even though there might not have been an associated action
|
|
|
set_add(visited, state)
|
|
@@ -439,7 +443,7 @@ Element function get_actions_to_execute(model : Element, source_states : Element
|
|
|
// Append, instead of prepend, as we want to do these operations in normal order!
|
|
|
|
|
|
// First check if there is any entry action at all
|
|
|
- action = read_attribute(model, state, "entry_action")
|
|
|
+ action = read_attribute(model, state, "onEntryScript")
|
|
|
if (element_neq(action, read_root())):
|
|
|
// An entry action is found!
|
|
|
list_append(result, get_func_AL_model(import_node(action)))
|