|
@@ -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 Oct 30 16:24:14 2017
|
|
|
+Date: Tue Oct 31 08:43:26 2017
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: MvK Server
|
|
@@ -1075,14 +1075,17 @@ class Modelverse(RuntimeClassBase):
|
|
|
|
|
|
# transition /initialized/behaviour/operations/store_on_scripted/process_execute/executing
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_0 = Transition(self, self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"], [self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/enacting/sc"]])
|
|
|
+ _initialized_behaviour_operations_store_on_scripted_process_execute_executing_0.setAction(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_0_exec)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_0.setTrigger(None)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_0.setGuard(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_0_guard)
|
|
|
self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"].addTransition(_initialized_behaviour_operations_store_on_scripted_process_execute_executing_0)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_1 = Transition(self, self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"], [self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/enacting/sc"]])
|
|
|
+ _initialized_behaviour_operations_store_on_scripted_process_execute_executing_1.setAction(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_exec)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_1.setTrigger(None)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_1.setGuard(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_guard)
|
|
|
self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"].addTransition(_initialized_behaviour_operations_store_on_scripted_process_execute_executing_1)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_2 = Transition(self, self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"], [self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/enacting/op"]])
|
|
|
+ _initialized_behaviour_operations_store_on_scripted_process_execute_executing_2.setAction(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_2_exec)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_2.setTrigger(None)
|
|
|
_initialized_behaviour_operations_store_on_scripted_process_execute_executing_2.setGuard(self._initialized_behaviour_operations_store_on_scripted_process_execute_executing_2_guard)
|
|
|
self.states["/initialized/behaviour/operations/store_on_scripted/process_execute/executing"].addTransition(_initialized_behaviour_operations_store_on_scripted_process_execute_executing_2)
|
|
@@ -2136,6 +2139,7 @@ class Modelverse(RuntimeClassBase):
|
|
|
|
|
|
def _initialized_behaviour_operations_2_exec(self, parameters):
|
|
|
self.raiseInternalEvent(Event("exception", None, ['UnknownError', 'Error: %s' % self.responses.pop(0)]))
|
|
|
+ print("Unknown Error")
|
|
|
|
|
|
def _initialized_behaviour_operations_2_guard(self, parameters):
|
|
|
return self.expect_response_partial('', pop=False)
|
|
@@ -2622,12 +2626,21 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_init_0_guard(self, parameters):
|
|
|
return self.expect_response('Success', pop=True)
|
|
|
|
|
|
+ def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_0_exec(self, parameters):
|
|
|
+ self.op_name = self.responses.pop(0).split(": ", 1)[1]
|
|
|
+
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_0_guard(self, parameters):
|
|
|
return self.expect_response_partial('Enacting ModelTransformation', pop=False)
|
|
|
|
|
|
+ def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_exec(self, parameters):
|
|
|
+ self.op_name = self.responses.pop(0).split(": ", 1)[1]
|
|
|
+
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_1_guard(self, parameters):
|
|
|
return self.expect_response_partial('Enacting ActionLanguage', pop=False)
|
|
|
|
|
|
+ def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_2_exec(self, parameters):
|
|
|
+ self.op_name = self.responses.pop(0).split(": ", 1)[1]
|
|
|
+
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_executing_2_guard(self, parameters):
|
|
|
return self.expect_response_partial('Enacting ManualOperation', pop=False)
|
|
|
|
|
@@ -2640,7 +2653,7 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_enacting_sc_init_0_exec(self, parameters):
|
|
|
self.input_context = str(uuid.uuid4())
|
|
|
self.inputs[self.input_context] = []
|
|
|
- self.raiseInternalEvent(Event("result", None, [['SC', self.responses.pop(0).split(': ', 1)[1], self.input_context]]))
|
|
|
+ self.raiseInternalEvent(Event("result", None, [['SC', self.op_name, self.input_context]]))
|
|
|
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_enacting_sc_processing_0_exec(self, parameters):
|
|
|
self.raiseInternalEvent(Event("data_output", None, [self.responses.pop(0)]))
|
|
@@ -2657,7 +2670,7 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_enacting_op_init_0_exec(self, parameters):
|
|
|
self.context = str(uuid.uuid4())
|
|
|
self.actions[self.context] = []
|
|
|
- self.raiseInternalEvent(Event("result", None, [['OP', self.responses.pop(0).split(': ', 1)[1], self.context]]))
|
|
|
+ self.raiseInternalEvent(Event("result", None, [['OP', self.op_name, self.context]]))
|
|
|
|
|
|
def _initialized_behaviour_operations_store_on_scripted_process_execute_enacting_op_processing_0_guard(self, parameters):
|
|
|
return self.expect_response_partial('Please perform manual operation ', pop=True)
|