|
@@ -113,19 +113,28 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
|
|
|
|
|
|
ic = allIncomingAssociationInstances(schedule_model, current_element, "PreElement")
|
|
|
oc = allOutgoingAssociationInstances(schedule_model, current_element, "PreElement")
|
|
|
+ log("Finding throughout ")
|
|
|
+ log(set_to_string(ic))
|
|
|
+ log(set_to_string(oc))
|
|
|
|
|
|
- while (bool_and(read_nr_out(ic) > 0, read_nr_out(options) == 0)):
|
|
|
+ String value
|
|
|
+ while (bool_and(read_nr_out(ic) > 0, read_nr_out(options) < 2)):
|
|
|
poll = set_pop(ic)
|
|
|
if (dict_in(map, read_attribute(schedule_model, poll, "label"))):
|
|
|
// This incoming link is already defined, so we just have one option: the destination of the link we matched
|
|
|
- set_add(options, readAssociationDestination(host_model, map[read_attribute(schedule_model, poll, "label")]))
|
|
|
+ value = readAssociationDestination(host_model, map[read_attribute(schedule_model, poll, "label")])
|
|
|
+ if (bool_not(set_in(options, value))):
|
|
|
+ set_add(options, value)
|
|
|
|
|
|
- while (bool_and(read_nr_out(oc) > 0, read_nr_out(options) == 0)):
|
|
|
+ while (bool_and(read_nr_out(oc) > 0, read_nr_out(options) < 2)):
|
|
|
poll = set_pop(oc)
|
|
|
if (dict_in(map, read_attribute(schedule_model, poll, "label"))):
|
|
|
// This incoming link is already defined, so we just have one option: the destination of the link we matched
|
|
|
- set_add(options, readAssociationSource(host_model, map[read_attribute(schedule_model, poll, "label")]))
|
|
|
+ value = readAssociationSource(host_model, map[read_attribute(schedule_model, poll, "label")]))
|
|
|
+ if (bool_not(set_in(options, value))):
|
|
|
+ set_add(options, value)
|
|
|
|
|
|
+ log("Result: " + set_to_string(options))
|
|
|
if (read_nr_out(options) == 0):
|
|
|
// Is a node and no connections, so we just pick all options
|
|
|
options = allInstances(host_model, original_typename)
|