|
|
@@ -1157,28 +1157,31 @@ String function cmd_process_signature(process : String):
|
|
|
process_id = get_entry_id(process)
|
|
|
if (process_id != ""):
|
|
|
if (allow_execute(current_user_id, process_id)):
|
|
|
- Element pm
|
|
|
- pm = get_full_model(process_id, get_entry_id("formalisms/ProcessModel"))
|
|
|
-
|
|
|
- if (element_eq(pm, read_root())):
|
|
|
- return "Not a ProcessModel: " + process!
|
|
|
+ if (read_type(core, process_id) == "Model"):
|
|
|
+ Element pm
|
|
|
+ pm = get_full_model(process_id, get_entry_id("formalisms/ProcessModel"))
|
|
|
+
|
|
|
+ if (element_eq(pm, read_root())):
|
|
|
+ return "Not a ProcessModel: " + process!
|
|
|
|
|
|
- result = "Success: "
|
|
|
- signature = PM_signature(pm)
|
|
|
- keys = dict_keys(signature)
|
|
|
- Element found_keys
|
|
|
- found_keys = set_create()
|
|
|
- while (set_len(keys) > 0):
|
|
|
- key = set_pop(keys)
|
|
|
- result = result + key + " : " + cast_string(signature[key]) + "\n"
|
|
|
- if set_in(found_keys, key):
|
|
|
- return "Not a valid ProcessModel: " + process!
|
|
|
- else:
|
|
|
- set_add(found_keys, key)
|
|
|
+ result = "Success: "
|
|
|
+ signature = PM_signature(pm)
|
|
|
+ keys = dict_keys(signature)
|
|
|
+ Element found_keys
|
|
|
+ found_keys = set_create()
|
|
|
+ while (set_len(keys) > 0):
|
|
|
+ key = set_pop(keys)
|
|
|
+ result = result + key + " : " + cast_string(signature[key]) + "\n"
|
|
|
+ if set_in(found_keys, key):
|
|
|
+ return "Not a valid ProcessModel: " + process!
|
|
|
+ else:
|
|
|
+ set_add(found_keys, key)
|
|
|
|
|
|
- return result!
|
|
|
+ return result!
|
|
|
+ else:
|
|
|
+ return "Not a model: " + process!
|
|
|
else:
|
|
|
- return "Execute permission denied to model: " + process!
|
|
|
+ return "Execute permission denied to: " + process!
|
|
|
else:
|
|
|
return "Model not found: " + process!
|
|
|
|