|
@@ -1044,6 +1044,7 @@ String function cmd_transformation_between(source_name : String, target_name : S
|
|
|
Element result
|
|
|
String transformation
|
|
|
|
|
|
+ log("Finding transformation from " + source_name + " to " + target_name)
|
|
|
source_id = get_entry_id(source_name)
|
|
|
if (source_id != ""):
|
|
|
target_id = get_entry_id(target_name)
|
|
@@ -1060,6 +1061,7 @@ String function cmd_transformation_between(source_name : String, target_name : S
|
|
|
transformation = set_pop(result)
|
|
|
if (allow_read(current_user_id, transformation)):
|
|
|
r = r + string_join(full_name(transformation), "\n")
|
|
|
+ log("Found: " + full_name(transformation))
|
|
|
return r!
|
|
|
else:
|
|
|
return "Model not found: " + target_name!
|
|
@@ -1255,26 +1257,24 @@ String function cmd_transformation_execute(transformation_name : String, source_
|
|
|
assoc_name = read_attribute(core, target, "name")
|
|
|
if (dict_in(target_models, assoc_name)):
|
|
|
target_model_name = target_models[assoc_name]
|
|
|
- else:
|
|
|
- return "Target model not bound: " + assoc_name!
|
|
|
|
|
|
- if (get_entry_id(target_model_name) == ""):
|
|
|
- // Doesn't exist yet, so we can easily create
|
|
|
- if (get_entry_id(get_foldername(target_model_name)) == ""):
|
|
|
- return "Folder not found: " + get_foldername(target_model_name)!
|
|
|
+ if (get_entry_id(target_model_name) == ""):
|
|
|
+ // Doesn't exist yet, so we can easily create
|
|
|
+ if (get_entry_id(get_foldername(target_model_name)) == ""):
|
|
|
+ return "Folder not found: " + get_foldername(target_model_name)!
|
|
|
+ else:
|
|
|
+ if (allow_write(current_user_id, get_entry_id(get_foldername(target_model_name)))):
|
|
|
+ dict_add(output_map, assoc_name, full_name(readAssociationDestination(core, target)))
|
|
|
+ dict_add(outputs, assoc_name, target_model_name)
|
|
|
+ else:
|
|
|
+ return "Permission denied to folder: " + get_foldername(target_model_name)!
|
|
|
else:
|
|
|
- if (allow_write(current_user_id, get_entry_id(get_foldername(target_model_name)))):
|
|
|
- dict_add(output_map, assoc_name, full_name(readAssociationDestination(core, target)))
|
|
|
+ // Already exists, so we need to check for write access
|
|
|
+ if (allow_write(current_user_id, get_entry_id(target_model_name))):
|
|
|
+ dict_add(output_map, assoc_name, read_attribute(core, readAssociationDestination(core, target), "name"))
|
|
|
dict_add(outputs, assoc_name, target_model_name)
|
|
|
else:
|
|
|
- return "Permission denied to folder: " + get_foldername(target_model_name)!
|
|
|
- else:
|
|
|
- // Already exists, so we need to check for write access
|
|
|
- if (allow_write(current_user_id, get_entry_id(target_model_name))):
|
|
|
- dict_add(output_map, assoc_name, read_attribute(core, readAssociationDestination(core, target), "name"))
|
|
|
- dict_add(outputs, assoc_name, target_model_name)
|
|
|
- else:
|
|
|
- return "Permission denied to model: " + target_model_name!
|
|
|
+ return "Permission denied to model: " + target_model_name!
|
|
|
|
|
|
if (read_type(core, transformation_id) == "ActionLanguage"):
|
|
|
output("Success: ready for AL execution")
|
|
@@ -2053,12 +2053,12 @@ String function cmd_transformation_signature(transformation_name : String):
|
|
|
inputs = allOutgoingAssociationInstances(core, model_id, "transformInput")
|
|
|
while (set_len(inputs) > 0):
|
|
|
elem = set_pop(inputs)
|
|
|
- result = string_join(string_join(string_join(string_join("I ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
|
|
|
+ result = string_join(string_join(string_join(string_join(result + "I ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
|
|
|
|
|
|
outputs = allOutgoingAssociationInstances(core, model_id, "transformOutput")
|
|
|
while (set_len(outputs) > 0):
|
|
|
elem = set_pop(outputs)
|
|
|
- result = string_join(string_join(string_join(string_join("O ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
|
|
|
+ result = string_join(string_join(string_join(string_join(result + "O ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
|
|
|
|
|
|
return result!
|
|
|
else:
|