Sfoglia il codice sorgente

Fixed activity execution again

Yentl Van Tendeloo 7 anni fa
parent
commit
799c2c749f
2 ha cambiato i file con 5 aggiunte e 9 eliminazioni
  1. 4 8
      wrappers/modelverse.py
  2. 1 1
      wrappers/modelverse_SCCD.py

+ 4 - 8
wrappers/modelverse.py

@@ -212,15 +212,10 @@ def transformation_execute_AL(operation_name, input_models_dict, output_models_d
 
 
 def transformation_execute_MANUAL(operation_name, input_models_dict, output_models_dict, callback=None, tracability_model=""):
 def transformation_execute_MANUAL(operation_name, input_models_dict, output_models_dict, callback=None, tracability_model=""):
     INPUT("transformation_execute", None, [operation_name, input_models_dict, output_models_dict, tracability_model])
     INPUT("transformation_execute", None, [operation_name, input_models_dict, output_models_dict, tracability_model])
-    print("Wait for context")
     op, name, context, model = OUTPUT()
     op, name, context, model = OUTPUT()
-    print("Got context: " + str(context))
     if callback is not None:
     if callback is not None:
         callback(context)
         callback(context)
-        print("Callback complete")
-    print("Send exit")
     INPUT("exit", context, [])
     INPUT("exit", context, [])
-    print("Exitted")
     return OUTPUT()
     return OUTPUT()
 
 
 def transformation_signature(operation_name):
 def transformation_signature(operation_name):
@@ -384,13 +379,14 @@ def process_execute(process_name, prefix, callbacks=None):
     operation = OUTPUT()
     operation = OUTPUT()
     while 1:
     while 1:
         if isinstance(operation, (list, tuple)):
         if isinstance(operation, (list, tuple)):
-            t, name, context = operation
-            if t == "OP":
+            if operation[0] == "OP":
+                t, name, context, model = operation
                 if name in callbacks:
                 if name in callbacks:
                     callbacks[name](context)
                     callbacks[name](context)
                 INPUT("exit", context, [])
                 INPUT("exit", context, [])
                 operation = OUTPUT()
                 operation = OUTPUT()
-            elif t == "SC":
+            elif operation[0] == "SC":
+                t, name, context = operation
                 if name in callbacks:
                 if name in callbacks:
                     statechart = callbacks[name]
                     statechart = callbacks[name]
                 else:
                 else:

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
 
-Date:   Wed Nov  8 10:08:42 2017
+Date:   Wed Nov  8 10:19:13 2017
 
 
 Model author: Yentl Van Tendeloo
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server
 Model name:   MvK Server