|
@@ -133,7 +133,7 @@
|
|
|
<raise event="create_instance" scope="cd">
|
|
|
<parameter expr="'activity_browse'"/>
|
|
|
<parameter expr="'Button'"/>
|
|
|
- <parameter expr="{'parent': self.exec_frame, 'event_parameters': 'execute', 'visual': TextVisual('EXECUTE'), 'tooltip_text': 'Execute the activity'}"/>
|
|
|
+ <parameter expr="{'parent': self.exec_frame, 'event_parameters': 'execute', 'visual': TextVisual('START'), 'tooltip_text': 'Enact the process'}"/>
|
|
|
</raise>
|
|
|
</onentry>
|
|
|
|
|
@@ -178,22 +178,11 @@
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
- <state id="execute" initial="check_args">
|
|
|
- <state id="check_args">
|
|
|
- <onentry>
|
|
|
- <raise event="change_bg" scope="narrow" target="[self.stored_associations['input_%s' % i] for i in self.input_signature.keys()]">
|
|
|
- <parameter expr="'light grey'"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
- <transition cond="set(self.exec_input_signature.keys()) == set(self.input_signature.keys())" target="../execute">
|
|
|
- <raise event="disable" scope="narrow" target="'model_browse_entry'"/>
|
|
|
- </transition>
|
|
|
- </state>
|
|
|
-
|
|
|
+ <state id="execute" initial="execute">
|
|
|
<state id="execute">
|
|
|
<onentry>
|
|
|
<script>
|
|
|
- print("Executing activity %s" % self.activity)
|
|
|
+ print("Executing process %s" % self.activity)
|
|
|
print(" Inputs " + str(self.exec_input_signature))
|
|
|
</script>
|
|
|
|
|
@@ -203,45 +192,45 @@
|
|
|
</raise>
|
|
|
</onentry>
|
|
|
|
|
|
- <transition event="mv_response" target="../in_context">
|
|
|
+ <transition target="../in_context"/>
|
|
|
+ </state>
|
|
|
+
|
|
|
+ <state id="in_context" initial="waiting">
|
|
|
+ <state id="dialog">
|
|
|
+ <!-- TODO Add data_input and data_output -->
|
|
|
+ </state>
|
|
|
+
|
|
|
+ <state id="manual">
|
|
|
+ <transition cond="self.subprocess.poll() is not None" target="../waiting">
|
|
|
+ <raise event="mv_request_context" scope="broad">
|
|
|
+ <parameter expr="'exit'"/>
|
|
|
+ <parameter expr="[]"/>
|
|
|
+ <parameter expr="self.current_context[2]"/>
|
|
|
+ </raise>
|
|
|
+ </transition>
|
|
|
+ <transition after="0.5" target="."/>
|
|
|
+ </state>
|
|
|
+
|
|
|
+ <state id="waiting"/>
|
|
|
+
|
|
|
+ <transition event="mv_response" cond="context[0] == 'OP'" target="manual">
|
|
|
<parameter name="context"/>
|
|
|
<script>
|
|
|
self.current_context = context
|
|
|
+ print("Got context: " + str(self.current_context))
|
|
|
+ print("Opening new browser")
|
|
|
+ self.subprocess = subprocess.Popen([sys.executable, sys.argv[0], "--address", data['mv_address'], "--username", data['username'], "--password", data['password'], "--model", context[3], "--limited"])
|
|
|
</script>
|
|
|
</transition>
|
|
|
- </state>
|
|
|
|
|
|
- <state id="in_context">
|
|
|
- <!-- TODO Add data_input and data_output -->
|
|
|
- <transition event="mv_response" cond="result == True" target="../alter_context_result">
|
|
|
- <parameter name="result"/>
|
|
|
- </transition>
|
|
|
- <transition event="mv_response" cond="result == False" target="../../ready">
|
|
|
- <parameter name="result"/>
|
|
|
+ <transition event="mv_response" cond="context[0] == 'SC'" target="dialog">
|
|
|
+ <parameter name="context"/>
|
|
|
+ <script>
|
|
|
+ print("Executing dialog with MV (not implemented...)")
|
|
|
+ self.current_context = context
|
|
|
+ </script>
|
|
|
</transition>
|
|
|
</state>
|
|
|
-
|
|
|
- <state id="alter_context_result" initial="check_next">
|
|
|
- <state id="check_next">
|
|
|
- <transition cond="self.exec_output_signature" target="../add"/>
|
|
|
- <transition cond="not self.exec_output_signature" target="../../../closing"/>
|
|
|
- </state>
|
|
|
-
|
|
|
- <state id="add">
|
|
|
- <onentry>
|
|
|
- <script>
|
|
|
- tag, model = self.exec_output_signature.popitem()
|
|
|
- metamodel = self.output_signature[tag]
|
|
|
- </script>
|
|
|
- <raise event="mv_request" scope="broad">
|
|
|
- <parameter expr="'alter_context'"/>
|
|
|
- <parameter expr="[model, metamodel]"/>
|
|
|
- </raise>
|
|
|
- </onentry>
|
|
|
-
|
|
|
- <transition event="mv_response" target="../check_next"/>
|
|
|
- </state>
|
|
|
- </state>
|
|
|
</state>
|
|
|
|
|
|
<state id="browse_activity" initial="create_browser">
|