|
@@ -531,19 +531,8 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
|
|
|
exact_type = read_type(core, operation_id)
|
|
|
|
|
|
- if (exact_type == "ModelTransformation"):
|
|
|
- linktype = "RAMified"
|
|
|
- ramified_metamodel_id = set_pop(allAssociationDestinations(core, operation_id, "instanceOf"))
|
|
|
- trace_links = allOutgoingAssociationInstances(core, ramified_metamodel_id, "tracability")
|
|
|
- elif (exact_type == "ManualOperation"):
|
|
|
- linktype = "operatesOn"
|
|
|
- trace_links = allOutgoingAssociationInstances(core, operation_id, "tracability")
|
|
|
- elif (exact_type == "ActionLanguage"):
|
|
|
- linktype = "operatesOn"
|
|
|
- trace_links = allOutgoingAssociationInstances(core, operation_id, "tracability")
|
|
|
- else:
|
|
|
- // Don't know how to execute this operation!
|
|
|
- return read_root()!
|
|
|
+ trace_links = allOutgoingAssociationInstances(core, operation_id, "tracability")
|
|
|
+ linktype = "operatesOn"
|
|
|
|
|
|
merged_metamodel_id = ""
|
|
|
while (read_nr_out(trace_links) > 0):
|
|
@@ -575,7 +564,7 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
func = get_func_AL_model(get_full_model(operation_id))
|
|
|
result = func(merged_model)
|
|
|
else:
|
|
|
- log("ERROR")
|
|
|
+ return read_root()!
|
|
|
|
|
|
// 4) Split in different models depending on type
|
|
|
|
|
@@ -1057,6 +1046,7 @@ String function cmd_transformation_execute(user_id : String, transformation_name
|
|
|
else:
|
|
|
output("Success: ready for MT execution")
|
|
|
|
|
|
+ log("Start execution: " + cast_e2s(transformation_id))
|
|
|
result = execute_operation(transformation_id, inputs, output_map, read_root())
|
|
|
|
|
|
// Now write out the models again
|
|
@@ -1338,6 +1328,9 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
|
|
|
String key
|
|
|
String mm
|
|
|
Element to_ramify
|
|
|
+ String source_formalism_id
|
|
|
+ String merged_formalism_id
|
|
|
+ String tracability_link
|
|
|
|
|
|
source = create_node()
|
|
|
target = create_node()
|
|
@@ -1390,6 +1383,7 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
|
|
|
return "Model not found: " + name!
|
|
|
|
|
|
merged_formalism = model_fuse(to_ramify)
|
|
|
+
|
|
|
ramified_metamodel = ramify(merged_formalism)
|
|
|
model_create(ramified_metamodel, "__RAM_" + operation_name, user_id, get_model_id("SimpleClassDiagrams"), "Model")
|
|
|
ramified_metamodel_id = get_model_id("__RAM_" + operation_name)
|
|
@@ -1403,6 +1397,15 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
|
|
|
model_create(new_model, operation_name, user_id, ramified_metamodel_id, "ModelTransformation")
|
|
|
model_id = get_model_id(operation_name)
|
|
|
|
|
|
+ // Write out a merged metamodel containing all these models: this is the MM for the manual operation
|
|
|
+ // New location is available, so write
|
|
|
+ model_create(merged_formalism, "__merged_" + operation_name, user_id, get_model_id("SimpleClassDiagrams"), "Model")
|
|
|
+ merged_formalism_id = get_model_id("__merged_" + operation_name)
|
|
|
+
|
|
|
+ // Add tracability links at this level
|
|
|
+ tracability_link = instantiate_link(core, "tracability", "", model_id, merged_formalism_id)
|
|
|
+ instantiate_attribute(core, tracability_link, "type", "operatesOn")
|
|
|
+
|
|
|
// Extend metadata with info on source and target
|
|
|
String link
|
|
|
String dst
|