Browse Source

Fixed process enactment

Yentl Van Tendeloo 7 years ago
parent
commit
09efc30e3d

BIN
bootstrap/bootstrap.m.gz


+ 11 - 14
bootstrap/core_algorithm.alc

@@ -704,7 +704,6 @@ Element function execute_operation(operation_id : String, input_models : Element
 		while (get_entry_id(model_name) != ""):
 			model_name = ".tmp/" + random_string(20)
 		model_create(merged_model, model_name, merged_metamodel_id, "Model")
-		log("Transforming...")
 		// We want to modify, so modify
 		do_spawn_modify(model_name, True)
 		merged_model = get_full_model(get_entry_id(model_name), merged_metamodel_id)
@@ -819,6 +818,7 @@ Boolean function enact_action(pm : Element, element : String, mapping : Element)
 
 	if (element_eq(result, read_root())):
 		// Something went wrong!
+		output("Failure")
 		return False!
 	else:
 		keys = dict_keys(outputs)
@@ -829,6 +829,7 @@ Boolean function enact_action(pm : Element, element : String, mapping : Element)
 				model_create(result[key], output_map[key], get_entry_id(outputs[key]), "Model")
 			else:
 				model_overwrite(result[key], get_entry_id(output_map[key]), get_entry_id(outputs[key]))
+		output("Success")
 		return True!
 
 Element function PM_signature(pm : Element):
@@ -848,8 +849,11 @@ Void function enact_PM_activity(activity_to_task : Element, task_to_result : Ele
 	Boolean result
 	pm_tasks = activity_to_task
 	set_add(activity_to_task[element], get_taskname())
+	log("Spawn task for activity " + cast_string(read_attribute(pm, element, "name")))
 	result = enact_action(pm, element, mapping)
 	dict_add_fast(task_to_result, get_taskname(), result)
+	log("Finished task for activity " + cast_string(read_attribute(pm, element, "name")))
+	sleep(50)
 	return!
 
 Void function enact_PM(pm : Element, mapping : Element):
@@ -921,6 +925,7 @@ Void function enact_PM(pm : Element, mapping : Element):
 
 			if (type == "Finish"):
 				// We have finished, so terminate
+				log("Finished node reached!")
 				break!
 			elif (type == "Join"):
 				// Only do this if all dependencies are fullfilled
@@ -1001,8 +1006,10 @@ Void function enact_PM(pm : Element, mapping : Element):
 				sleep(0.1)
 
 	// Remove all mock locations again
+	log("Cleaning up")
 	while (set_len(mock_locations) > 0):
 		model_delete(get_entry_id(set_pop(mock_locations)))
+	log("Models cleaned up")
 
 	return !
 
@@ -1113,6 +1120,7 @@ String function cmd_process_execute(process : String, mapping : Element):
 				return "Specified model cannot be interpreted as a ProcessModel: " + process!
 
 			enact_PM(pm, mapping)
+			log("Finishing process execute")
 			return "Success"!
 		else:
 			return "Permission denied to model: " + process!
@@ -1339,12 +1347,8 @@ String function cmd_model_render(model_name : String, mapper_name : String, rend
 		return "Model not found: " + model_name!
 
 Boolean function do_spawn_modify(model_name : String, write : Boolean):
-	log("Spawned task for " + model_name)
-	log("Taskname: " + get_taskname())
 	output("Please edit this model before sending next input: " + model_name)
-	log("OK, waiting for input")
 	input()
-	log("SPAWN MODIFY ENDED")
 	return False!
 
 Boolean function do_spawn_activity(transformation_id : String, tracability_name : String, inputs : Element, outputs : Element, output_map : Element):
@@ -1363,12 +1367,10 @@ Boolean function do_spawn_activity(transformation_id : String, tracability_name
 	taskname = spawn(spawn_activity, lst)
 
 	output("Spawned activity on task: " + taskname)
-	log("Spawned activity")
 
 	while (set_len(returnvalue) == 0):
 		sleep(0.1)
 
-	log("Activity terminated!")
 	output("Finished task: " + taskname)
 	return cast_boolean(set_pop(returnvalue))!
 
@@ -1408,14 +1410,12 @@ Void function spawn_activity(returnvalue : Element, transformation_id : String,
 	if (element_eq(result, read_root())):
 		// Something went wrong!
 		set_add(returnvalue, False)
+		log("FAILURE")
 		output("Failure")
 	else:
 		keys = dict_keys(outputs)
 		while (set_len(keys) > 0):
 			key = set_pop(keys)
-			log("Writing away model with key " + cast_string(key))
-			log("Output map: " + dict_to_string(output_map))
-			log("Outputs: " + dict_to_string(outputs))
 			
 			if (get_entry_id(outputs[key]) == ""):
 				// New model
@@ -1424,9 +1424,9 @@ Void function spawn_activity(returnvalue : Element, transformation_id : String,
 				model_overwrite(result[key], get_entry_id(outputs[key]), get_entry_id(output_map[key]))
 
 		set_add(returnvalue, True)
+		log("SUCCESS")
 		output("Success")
 
-	sleep(5)
 	return!
 
 String function cmd_transformation_execute(transformation_name : String, source_models : Element, target_models : Element, tracability_name : String):
@@ -1554,7 +1554,6 @@ String function cmd_model_overwrite(model_name : String, metamodel_name : String
 				if (element_eq(mm, read_root())):
 					return "Metamodel does not conform to formalisms/SimpleClassDiagrams: " + metamodel_name!
 
-				log("Overwriting...")
 				output("Waiting for model constructors...")
 				new_model = compile_model(input(), mm)
 
@@ -2428,9 +2427,7 @@ Void function user_function_skip_init(user_id : String):
 		elif (cmd == "folder_create"):
 			output(cmd_folder_create(single_input("Folder name?")))
 		elif (cmd == "add_conformance"):
-			log("Adding conformance relation...")
 			output(cmd_conformance_add(single_input("Model name?"), single_input("Metamodel name?")))
-			log("Added!")
 		elif (cmd == "remove_conformance"):
 			// TODO
 			cmd = "FAIL"

+ 1 - 0
kernel/modelverse_kernel/main.py

@@ -706,6 +706,7 @@ class ModelverseKernel(object):
             if prev_frame is None:
                 _, =            yield [("DN", [task_root])]
                 del self.debug_info[self.taskname]
+                print("Cleanup task " + str(self.taskname))
             else:
                 if self.debug_info[self.taskname]:
                     self.debug_info[self.taskname].pop()

+ 8 - 41
wrappers/classes/modelverse.xml

@@ -172,7 +172,7 @@
                         </raise>
                         <script>
                             self.responses.append(json.loads(data))
-                            print("Got data at %s: %s" % (self.controller.taskname, str(json.loads(data))))
+                            #print("Got data at %s: %s" % (self.controller.taskname, str(json.loads(data))))
                         </script>
                     </transition>
 
@@ -606,7 +606,6 @@
                                 <transition cond="self.expect_response_partial('Please edit this model before sending next input: ', pop=False)" target="../wait_for_user">
                                     <script>
                                         model = self.responses.pop(0).split(": ", 1)[1]
-                                        print("Got model to edit: " + str(model))
                                     </script>
                                     <raise event="result">
                                         <parameter expr="model"/>
@@ -618,7 +617,6 @@
                                 <transition cond="None in self.inputs and self.inputs[None]" target="../upload_changes">
                                     <script>
                                         self.inputs[None].pop(0)
-                                        print("POP input indicating readyness")
                                     </script>
                                     <raise event="request">
                                         <parameter expr="True"/>
@@ -656,7 +654,6 @@
                                     <script>
                                         if len(self.parameters) > 4 and self.parameters[4] == False:
                                             self.finish_output_thread = True
-                                        print("Executing transformation " + str(self.parameters[0]))
                                     </script>
                                 </onentry>
 
@@ -671,20 +668,11 @@
                             </state>
 
                             <state id="waiting">
-                                <onentry>
-                                    <script>
-                                        print("Waiting on task " + self.sub_sc_taskname)
-                                    </script>
-                                </onentry>
-
                                 <transition cond="self.expect_response('Finished task: ' + self.sub_sc_taskname)" target="."/>
                                 <transition cond="self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)" target="../../../../wait_for_action/megamodelling">
                                     <raise event="result">
                                         <parameter expr="self.responses.pop(0) == 'Success'"/>
                                     </raise>
-                                    <script>
-                                        print("FINISHED")
-                                    </script>
                                 </transition>
                             </state>
                         </state>
@@ -711,18 +699,17 @@
                                 </transition>
 
                                 <transition cond="self.expect_response('Success', pop=True)" target="../../../../wait_for_action/megamodelling">
+                                    <script>
+                                        print("FINISH in SC")
+                                    </script>
                                     <raise event="result">
-                                        <parameter expr="'Finished'"/>
+                                        <parameter expr="'Success'"/>
                                     </raise>
+                                    <script>
+                                        print("RAISED")
+                                    </script>
                                 </transition>
                             </state>
-
-                            <transition cond="self.responses" target="executing">
-                                <!-- TODO remove -->
-                                <script>
-                                    print("RESPONSES: " + self.responses[0])
-                                </script>
-                            </transition>
                         </state>
 
                         <history id="history" type="deep"/>
@@ -1408,9 +1395,6 @@
                     <state id="activity" initial="SC">
                         <state id="SC">
                             <onentry>
-                                <script>
-                                    print("SC EXEC!")
-                                </script>
                                 <raise event="result">
                                     <parameter expr="'SC'"/>
                                 </raise>
@@ -1421,9 +1405,6 @@
                                     <raise event="result">
                                         <parameter expr="True if self.responses.pop(0) == 'Success' else False"/>
                                     </raise>
-                                    <script>
-                                        print("FINISHED")
-                                    </script>
                                 </transition>
 
                                 <transition cond="not (self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)) and self.expect_response_partial('', pop=False)" target=".">
@@ -1442,20 +1423,11 @@
 
                         <state id="OP">
                             <onentry>
-                                <script>
-                                    print("OP EXEC on " + str(self.controller.taskname))
-                                </script>
                                 <raise event="result">
                                     <parameter expr="'OP'"/>
                                 </raise>
                             </onentry>
 
-                            <onexit>
-                                <script>
-                                    print("LEAVING")
-                                </script>
-                            </onexit>
-
                             <state id="forwarding">
                                 <transition cond="self.expect_response_partial('Please perform manual operation ', pop=True)" target="."/>
 
@@ -1463,14 +1435,10 @@
                                     <raise event="result">
                                         <parameter expr="self.responses.pop(0).split(': ')[1]"/>
                                     </raise>
-                                    <script>
-                                        print("EDITING...")
-                                    </script>
                                 </transition>
 
                                 <transition cond="None in self.inputs and self.inputs[None]" target="../../../history">
                                     <script>
-                                        print("GOT DATA INPUT")
                                         self.inputs[None].pop(0)
                                     </script>
                                     <raise event="request">
@@ -2072,7 +2040,6 @@
                         <parameter name="value"/>
                         <parameter name="context_ID"/>
                         <script>
-                            print("Got data_input in MV")
                             self.inputs.setdefault(context_ID, []).append({"name": "data_input", "parameters": value})
                         </script>
                     </transition>

+ 26 - 37
wrappers/modelverse.py

@@ -53,34 +53,23 @@ def _next_ID():
     return ID
 
 def __run_new_modelverse(address, username, password, callback, model):
-    print("RUN NEW")
     init(address)
     login(username, password)
-    print("LOGIN OK")
     if callback is not None:
         callback(model)
     exit_save(model)
-    print("CALLBACK DONE")
 
 def __run_new_modelverse_activity(address, username, password, taskname, pipe, callback):
-    print("Run MV activity")
     init(address, taskname=taskname)
     controller.username = username
     controller.password = password
-    print("INIT OK")
     t = OUTPUT()
-    print("Got type: " + str(t))
 
     if t == "OP":
-        print("Requesting model...")
         model = OUTPUT()
-        print("Do manual operations on " + str(model))
         __invoke(callback, model)
-        print("Invocation OK")
         controller.addInput(Event("data_input", "action_in", [None, None]))
-        print("Waiting on output")
-        # TODO fix this to something using OUTPUT or so
-        time.sleep(5)
+        time.sleep(2)
     elif t == "SC":
         while 1:
             empty = True
@@ -88,7 +77,7 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
             # Fetch output from the MV
             response = responses.fetch(0)
             if response is not None:
-                print("Output of MV to SC: " + str(response))
+                print("Got response: " + str(response))
                 if response.name == "data_output":
                     # Got output of MV, so forward to SCCD
                     if pipe is not None:
@@ -96,9 +85,11 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
                 elif response.name == "result":
                     # Finished execution, so continue and return result
                     if pipe is not None:
+                        print("Sending over pipe!")
                         pipe.send(("terminate", []))
                         pipe.close()
-                    return response.parameters[1]
+                    print("TERMINATE")
+                    return
                 else:
                     raise Exception("Unknown data from MV to SC: " + str(response))
                 empty = False
@@ -118,13 +109,11 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
 
 def __invoke(callback, model):
     import multiprocessing
-    print("Invoked action!")
     p = multiprocessing.Process(target=__run_new_modelverse, args=[controller.address, controller.username, controller.password, callback, model])
     p.start()
     p.join()
-    print("Invocation done")
 
-def _process_SC(statechart, port_sc, taskname, block=True):
+def _process_SC(statechart, port_sc, taskname):
     import multiprocessing
     p2c_pipe, c2p_pipe = multiprocessing.Pipe()
     p = multiprocessing.Process(target=__run_new_modelverse_activity, args=[controller.address, controller.username, controller.password, taskname, c2p_pipe, None])
@@ -134,9 +123,11 @@ def _process_SC(statechart, port_sc, taskname, block=True):
 
         if p2c_pipe.poll():
             response = p2c_pipe.recv()
+            print("Got SC response: " + str(response))
             statechart[0].addInput(Event(response[0], statechart[1], response[1]))
             
             if response[0] == "terminate":
+                print("Got break")
                 p2c_pipe.close()
                 break
             empty = False
@@ -148,20 +139,16 @@ def _process_SC(statechart, port_sc, taskname, block=True):
 
         if empty:
             time.sleep(0.05)
-    if block:
-        p.join()
-    else:
-        return p
 
-def _process_OP(callback, taskname, block=True):
+    print("Wait for join")
+    p.join()
+    print("Joined SC")
+
+def _process_OP(callback, taskname):
     import multiprocessing
-    print("Running remote operation for taskname " + taskname)
     p = multiprocessing.Process(target=__run_new_modelverse_activity, args=[controller.address, controller.username, controller.password, taskname, None, callback])
     p.start()
-    if block:
-        p.join()
-    else:
-        return p
+    p.join()
 
 def INPUT(action, context, parameters):
     controller.addInput(Event("action", "action_in", [action, _next_ID(), context, parameters]))
@@ -305,9 +292,7 @@ def transformation_execute_MANUAL(operation_name, input_models_dict, output_mode
     INPUT("transformation_execute", None, [operation_name, input_models_dict, output_models_dict, tracability_model])
     taskname = OUTPUT()
 
-    print("Running manual task at " + str(taskname))
     _process_OP(callback, taskname)
-    print("Process OP called")
 
     return OUTPUT()
 
@@ -469,30 +454,34 @@ def process_execute(process_name, prefix, callbacks=None):
     INPUT("process_execute", None, [process_name, prefix])
 
     while 1:
+        print("Waiting for output...")
         result = OUTPUT()
+        print("Got result: " + str(result))
         if result == "Success":
             # Finished
+            print("FINISHING")
             return None
         else:
             taskname, operation = result
-            print("Operation: " + str(operation))
-            print("Taskname: " + str(taskname))
 
             if (operation in callbacks):
                 data = callbacks[operation]
 
                 if isinstance(data, (tuple, list)):
                     # Statechart, so consider like that
-                    print("Starting SC processing")
-                    _process_SC(data, sc_ports[operation], taskname, block=False)
+                    print("A")
+                    threading.Thread(target=_process_SC, args=[data, sc_ports[operation], taskname]).start()
+                    print("AE")
                 else:
                     # Assume function
-                    print("Starting OP processing")
-                    _process_OP(data, taskname, block=False)
+                    print("B")
+                    threading.Thread(target=_process_OP, args=[data, taskname]).start()
+                    print("BE")
             else:
                 # Assume empty function
-                print("Starting OP processing")
-                _process_OP(None, taskname, block=False)
+                print("C")
+                threading.Thread(target=_process_OP, args=[None, taskname]).start()
+                print("CE")
 
 def get_taskname():
     """Fetch the taskname of the current connection."""

+ 5 - 34
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Mon Nov 13 16:48:22 2017
+Date:   Tue Nov 14 09:33:14 2017
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server
@@ -291,7 +291,6 @@ class Modelverse(RuntimeClassBase):
         
         # state /initialized/behaviour/operations/store_on_scripted/transformation_execute/waiting
         self.states["/initialized/behaviour/operations/store_on_scripted/transformation_execute/waiting"] = State(48, "/initialized/behaviour/operations/store_on_scripted/transformation_execute/waiting", self)
-        self.states["/initialized/behaviour/operations/store_on_scripted/transformation_execute/waiting"].setEnter(self._initialized_behaviour_operations_store_on_scripted_transformation_execute_waiting_enter)
         
         # state /initialized/behaviour/operations/store_on_scripted/process_execute
         self.states["/initialized/behaviour/operations/store_on_scripted/process_execute"] = State(49, "/initialized/behaviour/operations/store_on_scripted/process_execute", self)
@@ -501,7 +500,6 @@ class Modelverse(RuntimeClassBase):
         # state /initialized/behaviour/wait_for_action/activity/OP
         self.states["/initialized/behaviour/wait_for_action/activity/OP"] = State(103, "/initialized/behaviour/wait_for_action/activity/OP", self)
         self.states["/initialized/behaviour/wait_for_action/activity/OP"].setEnter(self._initialized_behaviour_wait_for_action_activity_OP_enter)
-        self.states["/initialized/behaviour/wait_for_action/activity/OP"].setExit(self._initialized_behaviour_wait_for_action_activity_OP_exit)
         
         # state /initialized/behaviour/wait_for_action/activity/OP/forwarding
         self.states["/initialized/behaviour/wait_for_action/activity/OP/forwarding"] = State(104, "/initialized/behaviour/wait_for_action/activity/OP/forwarding", self)
@@ -1702,13 +1700,6 @@ class Modelverse(RuntimeClassBase):
         _initialized_behaviour_operations_2.setGuard(self._initialized_behaviour_operations_2_guard)
         self.states["/initialized/behaviour/operations"].addTransition(_initialized_behaviour_operations_2)
         
-        # transition /initialized/behaviour/operations/store_on_scripted/process_execute
-        _initialized_behaviour_operations_store_on_scripted_process_execute_0 = Transition(self, self.states["/initialized/behaviour/operations/store_on_scripted/process_execute"], [self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"]])
-        _initialized_behaviour_operations_store_on_scripted_process_execute_0.setAction(self._initialized_behaviour_operations_store_on_scripted_process_execute_0_exec)
-        _initialized_behaviour_operations_store_on_scripted_process_execute_0.setTrigger(None)
-        _initialized_behaviour_operations_store_on_scripted_process_execute_0.setGuard(self._initialized_behaviour_operations_store_on_scripted_process_execute_0_guard)
-        self.states["/initialized/behaviour/operations/store_on_scripted/process_execute"].addTransition(_initialized_behaviour_operations_store_on_scripted_process_execute_0)
-        
         # transition /initialized/behaviour/wait_for_action
         _initialized_behaviour_wait_for_action_0 = Transition(self, self.states["/initialized/behaviour/wait_for_action"], [self.states["/initialized/behaviour/wait_for_action/history"]])
         _initialized_behaviour_wait_for_action_0.setAction(self._initialized_behaviour_wait_for_action_0_exec)
@@ -1876,16 +1867,11 @@ class Modelverse(RuntimeClassBase):
         self.raiseInternalEvent(Event("request", None, [['verify', self.parameters[0], self.parameters[1]]]))
     
     def _initialized_behaviour_wait_for_action_activity_SC_enter(self):
-        print("SC EXEC!")
         self.raiseInternalEvent(Event("result", None, ['SC']))
     
     def _initialized_behaviour_wait_for_action_activity_OP_enter(self):
-        print("OP EXEC on " + str(self.controller.taskname))
         self.raiseInternalEvent(Event("result", None, ['OP']))
     
-    def _initialized_behaviour_wait_for_action_activity_OP_exit(self):
-        print("LEAVING")
-    
     def _init_enter(self):
         self.big_step.outputEventOM(Event("create_instance", None, [self, 'http_client', 'HTTPClient']))
         self.big_step.outputEventOM(Event("create_instance", None, [self, 'http_client', 'HTTPClient']))
@@ -1945,10 +1931,6 @@ class Modelverse(RuntimeClassBase):
         self.raiseInternalEvent(Event("request", None, [['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2]) + [self.parameters[3]]]))
         if len(self.parameters) > 4 and self.parameters[4] == False:
             self.finish_output_thread = True
-        print("Executing transformation " + str(self.parameters[0]))
-    
-    def _initialized_behaviour_operations_store_on_scripted_transformation_execute_waiting_enter(self):
-        print("Waiting on task " + self.sub_sc_taskname)
     
     def _initialized_behaviour_operations_store_on_scripted_process_execute_init_enter(self):
         self.raiseInternalEvent(Event("request", None, [['process_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1])]))
@@ -2118,12 +2100,6 @@ class Modelverse(RuntimeClassBase):
     def _initialized_behaviour_operations_2_guard(self, parameters):
         return self.expect_response_partial('', pop=False)
     
-    def _initialized_behaviour_operations_store_on_scripted_process_execute_0_exec(self, parameters):
-        print("RESPONSES: " + self.responses[0])
-    
-    def _initialized_behaviour_operations_store_on_scripted_process_execute_0_guard(self, parameters):
-        return self.responses
-    
     def _initialized_behaviour_wait_for_action_0_exec(self, parameters):
         print("Got unknown operation: " + str(self.actions[None].pop(0)))
         self.raiseInternalEvent(Event("exception", None, ['UnknownOperation', 'Operation is unknown']))
@@ -2325,7 +2301,7 @@ class Modelverse(RuntimeClassBase):
         data = parameters[0]
         self.big_step.outputEventOM(Event("narrow_cast", None, [self, self.http_clients[1], Event("HTTP_input", None, [urllib.urlencode({"op": "get_output", "taskname": self.taskname}), "parent"])]))
         self.responses.append(json.loads(data))
-        print("Got data at %s: %s" % (self.controller.taskname, str(json.loads(data))))
+        #print("Got data at %s: %s" % (self.controller.taskname, str(json.loads(data))))
     
     def _initialized_http_mapper_init_3_guard(self, parameters):
         data = parameters[0]
@@ -2536,7 +2512,6 @@ class Modelverse(RuntimeClassBase):
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_add_send_metadata_0_exec(self, parameters):
         model = self.responses.pop(0).split(": ", 1)[1]
-        print("Got model to edit: " + str(model))
         self.raiseInternalEvent(Event("result", None, [model]))
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_add_send_metadata_0_guard(self, parameters):
@@ -2544,7 +2519,6 @@ class Modelverse(RuntimeClassBase):
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_add_wait_for_user_0_exec(self, parameters):
         self.inputs[None].pop(0)
-        print("POP input indicating readyness")
         self.raiseInternalEvent(Event("request", None, [True]))
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_add_wait_for_user_0_guard(self, parameters):
@@ -2580,7 +2554,6 @@ class Modelverse(RuntimeClassBase):
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_execute_waiting_1_exec(self, parameters):
         self.raiseInternalEvent(Event("result", None, [self.responses.pop(0) == 'Success']))
-        print("FINISHED")
     
     def _initialized_behaviour_operations_store_on_scripted_transformation_execute_waiting_1_guard(self, parameters):
         return self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)
@@ -2596,7 +2569,9 @@ class Modelverse(RuntimeClassBase):
         return self.responses and ' : ' in self.responses[0]
     
     def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_exec(self, parameters):
-        self.raiseInternalEvent(Event("result", None, ['Finished']))
+        print("FINISH in SC")
+        self.raiseInternalEvent(Event("result", None, ['Success']))
+        print("RAISED")
     
     def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_guard(self, parameters):
         return self.expect_response('Success', pop=True)
@@ -2900,7 +2875,6 @@ class Modelverse(RuntimeClassBase):
     
     def _initialized_behaviour_wait_for_action_activity_SC_forwarding_0_exec(self, parameters):
         self.raiseInternalEvent(Event("result", None, [True if self.responses.pop(0) == 'Success' else False]))
-        print("FINISHED")
     
     def _initialized_behaviour_wait_for_action_activity_SC_forwarding_0_guard(self, parameters):
         return self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)
@@ -2922,13 +2896,11 @@ class Modelverse(RuntimeClassBase):
     
     def _initialized_behaviour_wait_for_action_activity_OP_forwarding_1_exec(self, parameters):
         self.raiseInternalEvent(Event("result", None, [self.responses.pop(0).split(': ')[1]]))
-        print("EDITING...")
     
     def _initialized_behaviour_wait_for_action_activity_OP_forwarding_1_guard(self, parameters):
         return self.expect_response_partial('Please edit this model before sending next input: ', pop=False)
     
     def _initialized_behaviour_wait_for_action_activity_OP_forwarding_2_exec(self, parameters):
-        print("GOT DATA INPUT")
         self.inputs[None].pop(0)
         self.raiseInternalEvent(Event("request", None, [0]))
     
@@ -3255,7 +3227,6 @@ class Modelverse(RuntimeClassBase):
     def _initialized_queue_queue_5_exec(self, parameters):
         value = parameters[0]
         context_ID = parameters[1]
-        print("Got data_input in MV")
         self.inputs.setdefault(context_ID, []).append({"name": "data_input", "parameters": value})
     
     def initializeStatechart(self):