Browse Source

Fixed activity execution again

Yentl Van Tendeloo 7 years ago
parent
commit
799c2c749f
2 changed files with 5 additions and 9 deletions
  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=""):
     INPUT("transformation_execute", None, [operation_name, input_models_dict, output_models_dict, tracability_model])
-    print("Wait for context")
     op, name, context, model = OUTPUT()
-    print("Got context: " + str(context))
     if callback is not None:
         callback(context)
-        print("Callback complete")
-    print("Send exit")
     INPUT("exit", context, [])
-    print("Exitted")
     return OUTPUT()
 
 def transformation_signature(operation_name):
@@ -384,13 +379,14 @@ def process_execute(process_name, prefix, callbacks=None):
     operation = OUTPUT()
     while 1:
         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:
                     callbacks[name](context)
                 INPUT("exit", context, [])
                 operation = OUTPUT()
-            elif t == "SC":
+            elif operation[0] == "SC":
+                t, name, context = operation
                 if name in callbacks:
                     statechart = callbacks[name]
                 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)
 
-Date:   Wed Nov  8 10:08:42 2017
+Date:   Wed Nov  8 10:19:13 2017
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server