|
@@ -233,53 +233,53 @@
|
|
|
</state>
|
|
|
</state>
|
|
|
|
|
|
- <state id="login" initial="wait_prompt_1">
|
|
|
- <state id="wait_prompt_1">
|
|
|
- <transition cond="self.expect_response('Log on as which user?', pop=True)" target="../wait_prompt_2">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.parameters[0]"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
+ <state id="operations" initial="model_list">
|
|
|
+ <history id="history" type="deep"/>
|
|
|
|
|
|
- <state id="wait_prompt_2">
|
|
|
- <transition cond="self.expect_response('Password for existing user?', pop=True)" target="../wait_prompt_existing">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.parameters[1]"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="login" initial="wait_prompt_1">
|
|
|
+ <state id="wait_prompt_1">
|
|
|
+ <transition cond="self.expect_response('Log on as which user?', pop=True)" target="../wait_prompt_2">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.parameters[0]"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <transition cond="self.expect_response('This is a new user: please give password!', pop=True)" target="../wait_prompt_existing">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.parameters[1]"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
+ <state id="wait_prompt_2">
|
|
|
+ <transition cond="self.expect_response('Password for existing user?', pop=True)" target="../wait_prompt_existing">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.parameters[1]"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
|
|
|
- <state id="wait_prompt_existing">
|
|
|
- <transition cond="self.expect_response('Welcome to the Model Management Interface v2.0!', pop=True)" target="../login_ok"/>
|
|
|
- <transition cond="self.expect_response('Wrong password!', pop=True)" target="../../wait_for_action/connected">
|
|
|
- <raise event="exception">
|
|
|
- <parameter expr="'PermissionDenied'"/>
|
|
|
- <parameter expr="'Permission denied!'"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
+ <transition cond="self.expect_response('This is a new user: please give password!', pop=True)" target="../wait_prompt_existing">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.parameters[1]"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="login_ok">
|
|
|
- <transition cond="self.expect_response('Use the \'help\' command for a list of possible commands', pop=True)" target="../../wait_for_action/megamodelling">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="'quiet'"/>
|
|
|
- </raise>
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="None"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
- </state>
|
|
|
+ <state id="wait_prompt_existing">
|
|
|
+ <transition cond="self.expect_response('Welcome to the Model Management Interface v2.0!', pop=True)" target="../login_ok"/>
|
|
|
+ <transition cond="self.expect_response('Wrong password!', pop=True)" target="../../../wait_for_action/connected">
|
|
|
+ <raise event="exception">
|
|
|
+ <parameter expr="'PermissionDenied'"/>
|
|
|
+ <parameter expr="'Permission denied!'"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="operations" initial="model_list">
|
|
|
- <history id="history" type="deep"/>
|
|
|
+ <state id="login_ok">
|
|
|
+ <transition cond="self.expect_response('Use the \'help\' command for a list of possible commands', pop=True)" target="../../../wait_for_action/megamodelling">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="'quiet'"/>
|
|
|
+ </raise>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="None"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
+ </state>
|
|
|
|
|
|
<state id="model_list">
|
|
|
<onentry>
|
|
@@ -356,11 +356,13 @@
|
|
|
</raise>
|
|
|
</onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response_partial('Success: ', pop=False)" target="../../wait_for_action/history">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.split_response(self.responses.pop(0))[0]"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="waiting">
|
|
|
+ <transition cond="self.expect_response_partial('Success: ', pop=False)" target="../../../wait_for_action/history">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.split_response(self.responses.pop(0))[0]"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
|
|
|
<state id="alter_context">
|
|
@@ -471,8 +473,11 @@
|
|
|
|
|
|
<state id="model_render">
|
|
|
<onentry>
|
|
|
+ <script>
|
|
|
+ print("RENDERING with parameters: " + str(self.parameters))
|
|
|
+ </script>
|
|
|
<raise event="request">
|
|
|
- <parameter expr="['model_render', self.parameters[0], self.parameters[1]]"/>
|
|
|
+ <parameter expr="['model_render', self.parameters[0], self.parameters[1], self.parameters[2]]"/>
|
|
|
</raise>
|
|
|
</onentry>
|
|
|
|
|
@@ -483,6 +488,20 @@
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
+ <state id="model_rendered">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['model_rendered', self.parameters[0], self.parameters[1]]"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
+
|
|
|
+ <transition cond="self.expect_response_partial('Success: ', pop=False)" target="../../wait_for_action/history">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="set(self.split_response(self.responses.pop(0)))"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
+
|
|
|
<state id="transformation_between">
|
|
|
<onentry>
|
|
|
<raise event="request">
|
|
@@ -1131,7 +1150,7 @@
|
|
|
<transition cond="self.expect_response_partial('Success: ', pop=False)" target="../../wait_for_action/history">
|
|
|
<script>
|
|
|
response = self.responses.pop(0).strip()
|
|
|
- _, response = response.split(" : ", 1)
|
|
|
+ _, response = response.split(": ", 1)
|
|
|
values = {line.split(" : ", 1)[0]: line.split(" : ", 1)[1] for line in response.split("\n")}
|
|
|
values = {key: values[key].split(" = ", 1)[1] for key in values}
|
|
|
</script>
|
|
@@ -1319,6 +1338,17 @@
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
+ <state id="save">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['exit', 'model_modify', self.current_model]"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
+
|
|
|
+ <transition cond="self.expect_response('Success')" target="."/>
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../wait_for_action/modelling/recognized/manual"/>
|
|
|
+ </state>
|
|
|
+
|
|
|
<transition cond="self.expect_response_partial('Element not found: ', pop=False)" target="../wait_for_action/history">
|
|
|
<raise event="exception">
|
|
|
<parameter expr="'UnknownIdentifier'"/>
|
|
@@ -1340,6 +1370,13 @@
|
|
|
self.responses.pop(0)
|
|
|
</script>
|
|
|
</transition>
|
|
|
+
|
|
|
+ <transition cond="self.expect_response_partial('', pop=False)" target="../wait_for_action/history">
|
|
|
+ <raise event="exception">
|
|
|
+ <parameter expr="'UnknownError'"/>
|
|
|
+ <parameter expr="'Error: %s' % self.responses.pop(0)"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
</state>
|
|
|
|
|
|
<state id="wait_for_action" initial="disconnected">
|
|
@@ -1352,7 +1389,7 @@
|
|
|
</state>
|
|
|
|
|
|
<state id="connected">
|
|
|
- <transition cond="self.expect_action(None, 'login')" target="../../login">
|
|
|
+ <transition cond="self.expect_action(None, 'login')" target="../../operations/login">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
@@ -1426,6 +1463,12 @@
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
+ <transition cond="self.expect_action(None, 'model_rendered')" target="../../operations/model_rendered">
|
|
|
+ <script>
|
|
|
+ self.load_action(None)
|
|
|
+ </script>
|
|
|
+ </transition>
|
|
|
+
|
|
|
<transition cond="self.expect_action(None, 'transformation_between')" target="../../operations/transformation_between">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
@@ -1570,7 +1613,8 @@
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, ['element_list', 'element_list_nice', 'types', 'types_full', 'read_info', 'read_attrs', 'instantiate', 'delete_element', 'attr_assign', 'attr_assign_code', 'attr_delete', 'read_outgoing', 'read_incoming', 'read_association_source', 'read_association_destination', 'connections_between', 'define_attribute', 'all_instances'])" target="../../going_manual"/>
|
|
|
+ <transition cond="self.expect_action(None, ['element_list', 'element_list_nice', 'types', 'types_full', 'read_info', 'read_attrs', 'instantiate', 'delete_element', 'attr_assign', 'attr_assign_code', 'attr_delete', 'read_outgoing', 'read_incoming', 'read_association_source', 'read_association_destination', 'connections_between', 'define_attribute', 'all_instances'])" target="../../going_manual">
|
|
|
+ </transition>
|
|
|
</state>
|
|
|
|
|
|
<state id="modelling">
|
|
@@ -1702,6 +1746,12 @@
|
|
|
self.load_action(self.context)
|
|
|
</script>
|
|
|
</transition>
|
|
|
+
|
|
|
+ <transition cond="self.expect_action(self.context, 'save')" target="../../../operations/save">
|
|
|
+ <script>
|
|
|
+ self.load_action(self.context)
|
|
|
+ </script>
|
|
|
+ </transition>
|
|
|
</state>
|
|
|
|
|
|
<transition cond="self.context is not None and self.actions[self.context]" target="../history">
|
|
@@ -1746,7 +1796,8 @@
|
|
|
</raise>
|
|
|
</onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!', pop=True)" target="../wait_for_action/modelling/recognized/manual"/>
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!', pop=True)" target="../wait_for_action/modelling/recognized/manual">
|
|
|
+ </transition>
|
|
|
|
|
|
<transition cond="self.expect_response_partial('No conformance relation can be found ', pop=False)" target="../wait_for_action/megamodelling">
|
|
|
<raise event="exception">
|