|
@@ -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: Tue Oct 31 08:57:11 2017
|
|
|
+Date: Tue Oct 31 10:44:35 2017
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: MvK Server
|
|
@@ -823,18 +823,23 @@ class Modelverse(RuntimeClassBase):
|
|
|
|
|
|
# transition /initialized/behaviour/operations/login/wait_prompt_existing
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_0 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/operations/login/wait_prompt_existing"]])
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_0.setAction(self._initialized_behaviour_operations_login_wait_prompt_existing_0_exec)
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_0.setTrigger(None)
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_0.setGuard(self._initialized_behaviour_operations_login_wait_prompt_existing_0_guard)
|
|
|
self.states["/initialized/behaviour/operations/login/wait_prompt_existing"].addTransition(_initialized_behaviour_operations_login_wait_prompt_existing_0)
|
|
|
- _initialized_behaviour_operations_login_wait_prompt_existing_1 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/operations/login/login_ok"]])
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_1 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/operations/login/wait_prompt_existing"]])
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_1.setTrigger(None)
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_1.setGuard(self._initialized_behaviour_operations_login_wait_prompt_existing_1_guard)
|
|
|
self.states["/initialized/behaviour/operations/login/wait_prompt_existing"].addTransition(_initialized_behaviour_operations_login_wait_prompt_existing_1)
|
|
|
- _initialized_behaviour_operations_login_wait_prompt_existing_2 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/wait_for_action/connected"]])
|
|
|
- _initialized_behaviour_operations_login_wait_prompt_existing_2.setAction(self._initialized_behaviour_operations_login_wait_prompt_existing_2_exec)
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_2 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/operations/login/login_ok"]])
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_2.setTrigger(None)
|
|
|
_initialized_behaviour_operations_login_wait_prompt_existing_2.setGuard(self._initialized_behaviour_operations_login_wait_prompt_existing_2_guard)
|
|
|
self.states["/initialized/behaviour/operations/login/wait_prompt_existing"].addTransition(_initialized_behaviour_operations_login_wait_prompt_existing_2)
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_3 = Transition(self, self.states["/initialized/behaviour/operations/login/wait_prompt_existing"], [self.states["/initialized/behaviour/wait_for_action/connected"]])
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_3.setAction(self._initialized_behaviour_operations_login_wait_prompt_existing_3_exec)
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_3.setTrigger(None)
|
|
|
+ _initialized_behaviour_operations_login_wait_prompt_existing_3.setGuard(self._initialized_behaviour_operations_login_wait_prompt_existing_3_guard)
|
|
|
+ self.states["/initialized/behaviour/operations/login/wait_prompt_existing"].addTransition(_initialized_behaviour_operations_login_wait_prompt_existing_3)
|
|
|
|
|
|
# transition /initialized/behaviour/operations/login/login_ok
|
|
|
_initialized_behaviour_operations_login_login_ok_0 = Transition(self, self.states["/initialized/behaviour/operations/login/login_ok"], [self.states["/initialized/behaviour/wait_for_action/megamodelling"]])
|
|
@@ -2357,6 +2362,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: " + str(json.loads(data)))
|
|
|
|
|
|
def _initialized_http_mapper_init_3_guard(self, parameters):
|
|
|
data = parameters[0]
|
|
@@ -2412,16 +2418,22 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_operations_login_wait_prompt_2_1_guard(self, parameters):
|
|
|
return self.expect_response('This is a new user: please give password!', pop=True)
|
|
|
|
|
|
+ def _initialized_behaviour_operations_login_wait_prompt_existing_0_exec(self, parameters):
|
|
|
+ self.raiseInternalEvent(Event("request", None, [self.parameters[1]]))
|
|
|
+
|
|
|
def _initialized_behaviour_operations_login_wait_prompt_existing_0_guard(self, parameters):
|
|
|
return self.expect_response('Please repeat the password', pop=True)
|
|
|
|
|
|
def _initialized_behaviour_operations_login_wait_prompt_existing_1_guard(self, parameters):
|
|
|
+ return self.expect_response('Passwords match!', pop=True)
|
|
|
+
|
|
|
+ def _initialized_behaviour_operations_login_wait_prompt_existing_2_guard(self, parameters):
|
|
|
return self.expect_response('Welcome to the Model Management Interface v2.0!', pop=True)
|
|
|
|
|
|
- def _initialized_behaviour_operations_login_wait_prompt_existing_2_exec(self, parameters):
|
|
|
+ def _initialized_behaviour_operations_login_wait_prompt_existing_3_exec(self, parameters):
|
|
|
self.raiseInternalEvent(Event("exception", None, ['PermissionDenied', 'Permission denied!']))
|
|
|
|
|
|
- def _initialized_behaviour_operations_login_wait_prompt_existing_2_guard(self, parameters):
|
|
|
+ def _initialized_behaviour_operations_login_wait_prompt_existing_3_guard(self, parameters):
|
|
|
return self.expect_response('Wrong password!', pop=True)
|
|
|
|
|
|
def _initialized_behaviour_operations_login_login_ok_0_exec(self, parameters):
|