|
@@ -520,7 +520,7 @@ def transformation_add_MANUAL(source_metamodels, target_metamodels, operation_na
|
|
|
|
|
|
_handle_output("Success")
|
|
|
|
|
|
-def transformation_execute_AL(operation_name, input_models_dict, output_models_dict, statechart=None, tracability_model=""):
|
|
|
+def transformation_execute_AL(operation_name, input_models_dict, output_models_dict, statechart=None, tracability_model="", fetch_output=True):
|
|
|
"""Execute an existing model operation."""
|
|
|
global mode
|
|
|
_goto_mode(MODE_MODELLING)
|
|
@@ -539,12 +539,16 @@ def transformation_execute_AL(operation_name, input_models_dict, output_models_d
|
|
|
return None
|
|
|
else:
|
|
|
# No statechart associated, so just wait until we are finished
|
|
|
- while _output() not in ["Success", "Failure"]:
|
|
|
- pass
|
|
|
- if _last_output() == "Success":
|
|
|
- return True
|
|
|
+ if fetch_output:
|
|
|
+ while _output() not in ["Success", "Failure"]:
|
|
|
+ pass
|
|
|
+ if _last_output() == "Success":
|
|
|
+ return True
|
|
|
+ else:
|
|
|
+ return False
|
|
|
else:
|
|
|
- return False
|
|
|
+ while 1:
|
|
|
+ time.sleep(1.0)
|
|
|
|
|
|
def transformation_execute_MANUAL(operation_name, input_models_dict, output_models_dict, callback=lambda i: None):
|
|
|
"""Execute an existing model operation."""
|
|
@@ -573,7 +577,7 @@ def transformation_execute_MANUAL(operation_name, input_models_dict, output_mode
|
|
|
else:
|
|
|
return False
|
|
|
|
|
|
-def transformation_execute_MT(operation_name, input_models_dict, output_models_dict, statechart=None, tracability_model=""):
|
|
|
+def transformation_execute_MT(operation_name, input_models_dict, output_models_dict, statechart=None, tracability_model="", fetch_output=True):
|
|
|
"""Execute an existing model operation."""
|
|
|
global mode
|
|
|
_goto_mode(MODE_MODELLING)
|
|
@@ -592,12 +596,16 @@ def transformation_execute_MT(operation_name, input_models_dict, output_models_d
|
|
|
return None
|
|
|
else:
|
|
|
# No statechart associated, so just wait until we are finished
|
|
|
- while _output() not in ["Success", "Failure"]:
|
|
|
- pass
|
|
|
- if _last_output() == "Success":
|
|
|
- return True
|
|
|
+ if fetch_output:
|
|
|
+ while _output() not in ["Success", "Failure"]:
|
|
|
+ pass
|
|
|
+ if _last_output() == "Success":
|
|
|
+ return True
|
|
|
+ else:
|
|
|
+ return False
|
|
|
else:
|
|
|
- return False
|
|
|
+ while 1:
|
|
|
+ time.sleep(1.0)
|
|
|
|
|
|
def transformation_list():
|
|
|
"""List existing model operations."""
|