|
@@ -48,7 +48,6 @@ Void function main():
|
|
|
al = import_node(al_location)
|
|
|
pm = import_node(pm_location)
|
|
|
tracability = import_node(tracability_location)
|
|
|
- log("Imported: " + cast_e2s(tracability))
|
|
|
|
|
|
// Create the Model itself and make public
|
|
|
core_formalism = import_node(core_location)
|
|
@@ -438,17 +437,22 @@ Void function model_overwrite(model : Element, model_id : String):
|
|
|
String location
|
|
|
String instanceOf_link
|
|
|
|
|
|
+ log("Phase 1")
|
|
|
location = "models/" + cast_id2s(model)
|
|
|
+ log("Export location content: " + cast_e2s(import_node(location)))
|
|
|
export_node(location, model["model"])
|
|
|
|
|
|
// Change location in meta-data
|
|
|
+ log("Phase 2")
|
|
|
unset_attribute(core, model_id, "location")
|
|
|
instantiate_attribute(core, model_id, "location", location)
|
|
|
|
|
|
+ log("Phase 3")
|
|
|
instanceOf_link = get_instanceOf_link(model_id)
|
|
|
unset_attribute(core, instanceOf_link, "type_mapping")
|
|
|
instantiate_attribute(core, instanceOf_link, "type_mapping", model["type_mapping"])
|
|
|
|
|
|
+ log("Phase 4")
|
|
|
return!
|
|
|
|
|
|
Boolean function check_is_typed_by(model_id : String, metamodel_id : String):
|
|
@@ -907,20 +911,14 @@ Void function user_function_skip_init(user_id : String):
|
|
|
tracability_model = get_full_model(get_model_id(tracability_name))
|
|
|
|
|
|
// Do the operation itself!
|
|
|
- log("Start transformation!")
|
|
|
result = execute_operation(mapper_ID, inputs, outputs, tracability_model)
|
|
|
- log("Transformation done")
|
|
|
- log("Result: " + dict_to_string(result))
|
|
|
- log("Access " + cast_v2s(read_attribute(core, type_ID, "name")))
|
|
|
|
|
|
// Overwrite the previous rendered model; tracability updated in-place
|
|
|
model_overwrite(result[read_attribute(core, type_ID, "name")], get_model_id(rendered_name))
|
|
|
- log("Overwrite")
|
|
|
|
|
|
// Also output the resulting model
|
|
|
- output("Mapping success!")
|
|
|
- output(pretty_print(rendered_name))
|
|
|
- log("Pretty printed!")
|
|
|
+ output("Mapping success")
|
|
|
+ output(pretty_print(get_full_model(get_model_id(rendered_name))))
|
|
|
|
|
|
else:
|
|
|
output("Permission denied")
|