|
@@ -832,7 +832,7 @@ Boolean function enact_action(pm : Element, element : String, mapping : Element)
|
|
|
// Something went wrong!
|
|
|
return False!
|
|
|
else:
|
|
|
- keys = dict_keys(result)
|
|
|
+ keys = dict_keys(outputs)
|
|
|
while (set_len(keys) > 0):
|
|
|
key = set_pop(keys)
|
|
|
if (get_entry_id(output_map[key]) == ""):
|
|
@@ -1300,13 +1300,6 @@ String function cmd_model_render(model_name : String, mapper_name : String, rend
|
|
|
else:
|
|
|
return "Model not found: " + model_name!
|
|
|
|
|
|
- //trace_links = allOutgoingAssociationInstances(core, operation_id, "tracability")
|
|
|
- //merged_metamodel_id = ""
|
|
|
- //while (set_len(trace_links) > 0):
|
|
|
- // trace_link_id = set_pop(trace_links)
|
|
|
- // if (value_eq(read_attribute(core, trace_link_id, "type"), "operatesOn")):
|
|
|
- // merged_metamodel_id = readAssociationDestination(core, trace_link_id)
|
|
|
-
|
|
|
String function cmd_transformation_execute(transformation_name : String, source_models : Element, target_models : Element, tracability_name : String):
|
|
|
// Execute a transformation, whatever type it is
|
|
|
// First we detect the type, so we know how to prepare for invocation
|
|
@@ -1414,14 +1407,19 @@ String function cmd_transformation_execute(transformation_name : String, source_
|
|
|
// Something went wrong!
|
|
|
return "Failure"!
|
|
|
else:
|
|
|
- keys = dict_keys(result)
|
|
|
+ keys = dict_keys(outputs)
|
|
|
while (set_len(keys) > 0):
|
|
|
key = set_pop(keys)
|
|
|
+ log("Writing away model with key " + cast_string(key))
|
|
|
+ log("Output map: " + dict_to_string(output_map))
|
|
|
+ log("Outputs: " + dict_to_string(outputs))
|
|
|
|
|
|
if (get_entry_id(outputs[key]) == ""):
|
|
|
// New model
|
|
|
+ log("New model!")
|
|
|
model_create(result[key], outputs[key], get_entry_id(output_map[key]), "Model")
|
|
|
else:
|
|
|
+ log("Existing model!")
|
|
|
model_overwrite(result[key], get_entry_id(outputs[key]), get_entry_id(output_map[key]))
|
|
|
|
|
|
return "Success"!
|