|
@@ -12,6 +12,18 @@
|
|
|
</body>
|
|
|
</method>
|
|
|
|
|
|
+ <method name="dict_to_list">
|
|
|
+ <parameter name="d"/>
|
|
|
+ <body>
|
|
|
+ l = []
|
|
|
+ for k, v in d.iteritems():
|
|
|
+ l.append(k)
|
|
|
+ l.append(v)
|
|
|
+ l.append("")
|
|
|
+ return l
|
|
|
+ </body>
|
|
|
+ </method>
|
|
|
+
|
|
|
<method name="split_response">
|
|
|
<parameter name="response"/>
|
|
|
<body>
|
|
@@ -27,6 +39,8 @@
|
|
|
<parameter name="expected"/>
|
|
|
<parameter name="pop" default="True"/>
|
|
|
<body>
|
|
|
+ #print("Expect response " + str(expected))
|
|
|
+ #print("Got responses: " + str(self.responses))
|
|
|
if self.responses and self.responses[0] == expected:
|
|
|
if pop:
|
|
|
del self.responses[0]
|
|
@@ -40,6 +54,8 @@
|
|
|
<parameter name="expected"/>
|
|
|
<parameter name="pop" default="False"/>
|
|
|
<body>
|
|
|
+ #print("Expect partial response " + str(expected))
|
|
|
+ #print("Got responses: " + str(self.responses))
|
|
|
if self.responses and self.responses[0].startswith(expected):
|
|
|
if pop:
|
|
|
del self.responses[0]
|
|
@@ -53,6 +69,9 @@
|
|
|
<parameter name="context"/>
|
|
|
<parameter name="expected"/>
|
|
|
<body>
|
|
|
+ #print("Expected action: " + str(expected))
|
|
|
+ #print("Context: " + str(context))
|
|
|
+ #print("Actions: " + str(self.actions[context]))
|
|
|
if isinstance(expected, list):
|
|
|
return self.actions[context] and self.actions[context][0]["name"] in expected
|
|
|
else:
|
|
@@ -447,230 +466,242 @@
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
- <state id="transformation_add_MT" initial="send_metadata">
|
|
|
- <state id="send_metadata">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_add_MT'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
- </raise>
|
|
|
+ <state id="store_on_scripted" initial="transformation_add_MT">
|
|
|
+ <state id="transformation_add_MT" initial="send_metadata">
|
|
|
+ <state id="send_metadata">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_add_MT'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
+ </raise>
|
|
|
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ self.code = self.parameters[3]
|
|
|
+ </script>
|
|
|
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- <transition target="../edit_metamodel"/>
|
|
|
+ <transition target="../edit_metamodel"/>
|
|
|
|
|
|
- </state>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="edit_metamodel">
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../going_scripted"/>
|
|
|
- <transition cond="self.expect_response('Waiting for model constructors...')" target="../send_model"/>
|
|
|
- </state>
|
|
|
+ <state id="edit_metamodel">
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../../going_scripted"/>
|
|
|
+ <transition cond="self.expect_response('Waiting for model constructors...')" target="../send_model"/>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="send_model">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.parameters[3]"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <state id="send_model">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.code"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
+
|
|
|
+ <transition cond="self.expect_response('Success')" target="../../../../wait_for_action/megamodelling">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="None"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <transition cond="self.expect_response('Success')" target="../../../wait_for_action/megamodelling">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="None"/>
|
|
|
- </raise>
|
|
|
+ <transition cond="self.expect_response_partial('', pop=False)" target="../../../wait_for_action/history">
|
|
|
+ <script>
|
|
|
+ print("UNKNOWN RESPONSE received: " + str(self.responses.pop(0)))
|
|
|
+ </script>
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
- <transition cond="self.expect_response_partial('', pop=False)" target="../../wait_for_action/history">
|
|
|
- <script>
|
|
|
- print("UNKNOWN RESPONSE received: " + str(self.responses.pop(0)))
|
|
|
- </script>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
-
|
|
|
- <state id="transformation_add_AL" initial="send_metadata">
|
|
|
- <state id="send_metadata">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_add_AL'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
- </raise>
|
|
|
+ <state id="transformation_add_AL" initial="send_metadata">
|
|
|
+ <state id="send_metadata">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_add_AL'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
+ </raise>
|
|
|
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
-
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ self.code = self.parameters[3]
|
|
|
+ </script>
|
|
|
|
|
|
- <transition target="../edit_metamodel"/>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- </state>
|
|
|
+ <transition target="../edit_metamodel"/>
|
|
|
|
|
|
- <state id="edit_metamodel">
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../going_scripted"/>
|
|
|
- <transition cond="self.expect_response('Waiting for code constructors...')" target="../send_model"/>
|
|
|
- </state>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="send_model">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.parameters[3]"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <state id="edit_metamodel">
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../../going_scripted"/>
|
|
|
+ <transition cond="self.expect_response('Waiting for code constructors...')" target="../send_model"/>
|
|
|
+ </state>
|
|
|
|
|
|
- <transition cond="self.expect_response('Success')" target="../../../wait_for_action/megamodelling">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="None"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="send_model">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.code"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
+
|
|
|
+ <transition cond="self.expect_response('Success')" target="../../../../wait_for_action/megamodelling">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="None"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
- </state>
|
|
|
|
|
|
- <state id="transformation_add_MANUAL" initial="send_metadata">
|
|
|
- <state id="send_metadata">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_add_MANUAL'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
- </raise>
|
|
|
+ <state id="transformation_add_MANUAL" initial="send_metadata">
|
|
|
+ <state id="send_metadata">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_add_MANUAL'] + self.dict_to_list(self.parameters[0]) + self.dict_to_list(self.parameters[1]) + [self.parameters[2]]"/>
|
|
|
+ </raise>
|
|
|
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ </script>
|
|
|
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- <transition target="../edit_metamodel"/>
|
|
|
+ <transition target="../edit_metamodel"/>
|
|
|
|
|
|
- </state>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="edit_metamodel">
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../going_scripted"/>
|
|
|
- <transition cond="self.expect_response('Success')" target="../../../wait_for_action/megamodelling">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="None"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="edit_metamodel">
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../../going_scripted"/>
|
|
|
+ <transition cond="self.expect_response('Success')" target="../../../../wait_for_action/megamodelling">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="None"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
- </state>
|
|
|
|
|
|
- <state id="transformation_execute_AL" initial="send_operation">
|
|
|
- <state id="send_operation">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <state id="transformation_execute_AL" initial="send_operation">
|
|
|
+ <state id="send_operation">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response('Success: ready for AL execution')" target="../dialog">
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
+ <transition cond="self.expect_response('Success: ready for AL execution')" target="../dialog">
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ </script>
|
|
|
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="dialog">
|
|
|
- <transition cond="self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)" target="../../../wait_for_action/history">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.responses.pop(0)"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="dialog">
|
|
|
+ <transition cond="self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)" target="../../../../wait_for_action/history">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.responses.pop(0)"/>
|
|
|
+ </raise>
|
|
|
+ </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=".">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.responses.pop(0)"/>
|
|
|
- </raise>
|
|
|
- </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=".">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.responses.pop(0)"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(self.context, 'data_input')" target=".">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.actions[self.context].pop(0)['parameters']"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <transition cond="self.expect_action(self.context, 'data_input')" target=".">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.actions[self.context].pop(0)['parameters']"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
- </state>
|
|
|
|
|
|
- <state id="transformation_execute_MT" initial="send_operation">
|
|
|
- <state id="send_operation">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <state id="transformation_execute_MT" initial="send_operation">
|
|
|
+ <state id="send_operation">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response('Success: ready for MT execution')" target="../dialog">
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
+ <transition cond="self.expect_response('Success: ready for MT execution')" target="../dialog">
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ </script>
|
|
|
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="dialog">
|
|
|
- <transition cond="self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)" target="../../../wait_for_action/history">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.responses.pop(0)"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="dialog">
|
|
|
+ <transition cond="self.expect_response('Success', pop=False) or self.expect_response('Failure', pop=False)" target="../../../../wait_for_action/history">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.responses.pop(0)"/>
|
|
|
+ </raise>
|
|
|
+ </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=".">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.responses.pop(0)"/>
|
|
|
- </raise>
|
|
|
- </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=".">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.responses.pop(0)"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(self.context, 'data_input')" target=".">
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="self.actions[self.context].pop(0)['parameters']"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <transition cond="self.expect_action(self.context, 'data_input')" target=".">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="self.actions[self.context].pop(0)['parameters']"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
- </state>
|
|
|
|
|
|
- <state id="transformation_execute_MANUAL" initial="send_metadata">
|
|
|
- <state id="send_metadata">
|
|
|
- <onentry>
|
|
|
- <raise event="request">
|
|
|
- <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
- </raise>
|
|
|
+ <state id="transformation_execute_MANUAL" initial="send_metadata">
|
|
|
+ <state id="send_metadata">
|
|
|
+ <onentry>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="['transformation_execute', self.parameters[0]] + self.dict_to_list(self.parameters[1]) + self.dict_to_list(self.parameters[2])"/>
|
|
|
+ </raise>
|
|
|
|
|
|
- <script>
|
|
|
- self.context = str(uuid.uuid4())
|
|
|
- </script>
|
|
|
+ <script>
|
|
|
+ self.context = str(uuid.uuid4())
|
|
|
+ self.actions[self.context] = []
|
|
|
+ </script>
|
|
|
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="self.context"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="self.context"/>
|
|
|
+ </raise>
|
|
|
+ </onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response('Success: ready for MANUAL execution')" target="../edit_model"/>
|
|
|
+ <transition cond="self.expect_response('Success: ready for MANUAL execution')" target="../edit_model"/>
|
|
|
|
|
|
- </state>
|
|
|
+ </state>
|
|
|
|
|
|
- <state id="edit_model">
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../going_scripted"/>
|
|
|
- <transition cond="self.expect_response('Success')" target="../../../wait_for_action/megamodelling">
|
|
|
- <raise event="result">
|
|
|
- <parameter expr="None"/>
|
|
|
- </raise>
|
|
|
- </transition>
|
|
|
+ <state id="edit_model">
|
|
|
+ <transition cond="self.expect_response('Model loaded, ready for commands!')" target="../../../../going_scripted"/>
|
|
|
+ <transition cond="self.expect_response('Success')" target="../../../../wait_for_action/megamodelling">
|
|
|
+ <raise event="result">
|
|
|
+ <parameter expr="None"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ </state>
|
|
|
</state>
|
|
|
+
|
|
|
+ <history id="history" type="deep"/>
|
|
|
</state>
|
|
|
|
|
|
<state id="process_execute">
|
|
@@ -1299,37 +1330,37 @@
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_add_MT')" target="../../operations/transformation_add_MT">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_add_MT')" target="../../operations/store_on_scripted/transformation_add_MT">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_add_AL')" target="../../operations/transformation_add_AL">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_add_AL')" target="../../operations/store_on_scripted/transformation_add_AL">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_add_MANUAL')" target="../../operations/transformation_add_MANUAL">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_add_MANUAL')" target="../../operations/store_on_scripted/transformation_add_MANUAL">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_execute_MT')" target="../../operations/transformation_execute_MT">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_execute_MT')" target="../../operations/store_on_scripted/transformation_execute_MT">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_execute_AL')" target="../../operations/transformation_execute_AL">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_execute_AL')" target="../../operations/store_on_scripted/transformation_execute_AL">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.expect_action(None, 'transformation_execute_MANUAL')" target="../../operations/transformation_execute_MANUAL">
|
|
|
+ <transition cond="self.expect_action(None, 'transformation_execute_MANUAL')" target="../../operations/store_on_scripted/transformation_execute_MANUAL">
|
|
|
<script>
|
|
|
self.load_action(None)
|
|
|
</script>
|
|
@@ -1453,9 +1484,9 @@
|
|
|
<state id="modelling">
|
|
|
<state id="recognized" initial="manual">
|
|
|
<state id="manual">
|
|
|
- <transition cond="self.expect_action(self.context, 'exit')" target="../../../../leaving_modelling"/>
|
|
|
+ <transition cond="self.expect_action(self.context, 'exit')" target="../../../../leaving_manual"/>
|
|
|
|
|
|
- <transition cond="self.actions[self.context] and self.actions[self.context][0]['parameters'][0] != self.current_model" target="../../../../leaving_modelling">
|
|
|
+ <transition cond="self.actions[self.context] and self.actions[self.context][0]['parameters'][0] != self.current_model" target="../../../../leaving_manual">
|
|
|
<script>
|
|
|
print("Sudden switch between two models: perform context switch!")
|
|
|
print("Requested operation for " + str(self.actions[self.context][0]['parameters'][0]))
|
|
@@ -1464,7 +1495,14 @@
|
|
|
</state>
|
|
|
|
|
|
<state id="scripted">
|
|
|
- <transition cond="self.expect_action(self.context, 'exit')" target="../../../../operations/history"/>
|
|
|
+ <transition cond="self.expect_action(self.context, 'exit')" target="../../../../operations/store_on_scripted/history">
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="'exit'"/>
|
|
|
+ </raise>
|
|
|
+ <script>
|
|
|
+ print("Returning to history of operations!")
|
|
|
+ </script>
|
|
|
+ </transition>
|
|
|
</state>
|
|
|
|
|
|
<transition cond="self.expect_action(self.context, 'element_list')" target="../../../operations/element_list">
|
|
@@ -1587,7 +1625,7 @@
|
|
|
</raise>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.context is None and self.actions[None]" target="../../leaving_modelling">
|
|
|
+ <transition cond="self.context is None and self.actions[None]" target="../../leaving_manual">
|
|
|
<script>
|
|
|
print("Got megamodelling operation in model (%s) : transferring" % self.actions[None][0])
|
|
|
</script>
|
|
@@ -1641,13 +1679,14 @@
|
|
|
<onentry>
|
|
|
<script>
|
|
|
self.current_model = None
|
|
|
+ print("GOING SCRIPTED")
|
|
|
</script>
|
|
|
</onentry>
|
|
|
|
|
|
- <transition cond="self.expect_response('Model loaded, ready for commands!', pop=True)" target="../wait_for_action/modelling/recognized/scripted"/>
|
|
|
+ <transition target="../wait_for_action/modelling/recognized/scripted"/>
|
|
|
</state>
|
|
|
|
|
|
- <state id="leaving_modelling">
|
|
|
+ <state id="leaving_manual">
|
|
|
<onentry>
|
|
|
<raise event="request">
|
|
|
<parameter expr="'exit'"/>
|
|
@@ -1656,7 +1695,6 @@
|
|
|
|
|
|
<transition cond="self.expect_response('Success', pop=True)" target="../wait_for_action/megamodelling"/>
|
|
|
</state>
|
|
|
-
|
|
|
</state>
|
|
|
|
|
|
<state id="queue">
|