|
@@ -485,8 +485,6 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
output_mms = create_node()
|
|
|
types = create_node()
|
|
|
|
|
|
- // TODO use the prefix for data locations (in model write/read in MvC)
|
|
|
-
|
|
|
// Read out the referenced element from the MvC
|
|
|
transformation_id = get_model_id(read_attribute(pm, element, "name"))
|
|
|
|
|
@@ -499,6 +497,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
value = read_attribute(pm, readAssociationDestination(pm, consumes_link), "name")
|
|
|
dict_add(inputs, name, prefix + value)
|
|
|
dict_add(types, name, read_attribute(pm, readAssociationDestination(pm, consumes_link), "type"))
|
|
|
+ log("Added inputs: " + cast_v2s(prefix + value))
|
|
|
|
|
|
// Find all outputs and their types (i.e., key)
|
|
|
lst = allAssociationDestinations(pm, element, "Produces")
|
|
@@ -548,6 +547,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
input_keys = dict_keys(inputs)
|
|
|
while (read_nr_out(input_keys) > 0):
|
|
|
key = set_pop(input_keys)
|
|
|
+ log("READ model with name " + cast_v2s(inputs[key]))
|
|
|
model_join(merged_model, get_full_model(get_model_id(inputs[key])), string_join(types[key], "/"))
|
|
|
|
|
|
// 3) Transform
|
|
@@ -564,6 +564,8 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
desired_metamodel_id = get_model_id(key)
|
|
|
split_off_model = model_split(merged_model, get_full_model(desired_metamodel_id), key + "/")
|
|
|
|
|
|
+ log("Wrote model to " + cast_v2s(outputs[key]))
|
|
|
+
|
|
|
// Check if the destination model already exists
|
|
|
if (get_model_id(outputs[key]) == ""):
|
|
|
// New model
|