|
@@ -455,12 +455,17 @@ Boolean function pm_finished(worklist : Element, pm : String):
|
|
|
finished = allInstances(pm, "Finish")
|
|
|
i = 0
|
|
|
cnt = read_nr_out(finished)
|
|
|
+ log("Finished elements: " + set_to_string(finished))
|
|
|
|
|
|
+ log("Check finished")
|
|
|
while (i < cnt):
|
|
|
// Check each finished element individually
|
|
|
- if (set_in(worklist, read_edge_dst(read_out(finished, i)))):
|
|
|
+ log("Check element " + cast_v2s(dict_read(read_edge_dst(read_out(worklist, i)), 0)))
|
|
|
+ if (set_in(finished, dict_read(read_edge_dst(read_out(worklist, i)), 0))):
|
|
|
+ log("Yes")
|
|
|
return True!
|
|
|
i = i + 1
|
|
|
+ log("NO")
|
|
|
|
|
|
return False!
|
|
|
|
|
@@ -482,7 +487,6 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
|
|
|
// TODO use the prefix for data locations (in model write/read in MvC)
|
|
|
|
|
|
- log("Enacting action " + cast_v2s(read_attribute(pm, element, "name")))
|
|
|
// Read out the referenced element from the MvC
|
|
|
transformation_id = get_model_id(read_attribute(pm, element, "name"))
|
|
|
|
|
@@ -695,6 +699,8 @@ Void function enact_PM(pm : Element, prefix : String, user_id : String):
|
|
|
element = tuple[0]
|
|
|
result = tuple[1]
|
|
|
|
|
|
+ log("Enacting " + cast_v2s(element))
|
|
|
+
|
|
|
// Find the type (to see what to do with it)
|
|
|
// this does not yet yield the type of transformation, if it is an Execution
|
|
|
type = read_type(pm, element)
|
|
@@ -749,8 +755,10 @@ Void function enact_PM(pm : Element, prefix : String, user_id : String):
|
|
|
String next
|
|
|
while (read_nr_out(all_next) > 0):
|
|
|
next = set_pop(all_next)
|
|
|
+ log("Adding to worklist: " + next)
|
|
|
set_add(worklist, create_tuple(next, result))
|
|
|
|
|
|
+ log("FINISHED")
|
|
|
// Reached a finish element, so stop
|
|
|
return !
|
|
|
|