Commit 23fa7293 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* 'delivery' values of Solver Decision is not simulation movements, not...

* 'delivery' values of Solver Decision is not simulation movements, not applications but delivery movements.
* stop to set 'solver' value of Simulation Movements with comments.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33947 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a826699c
......@@ -189,7 +189,7 @@ class SolverProcess(XMLObject, ActiveProcess):
application_list.sort()
solver_decision_key = (divergence_tester.getRelativeUrl(), tuple(application_list))
movement_dict = solver_decision_dict.setdefault(solver_decision_key, {})
movement_dict[simulation_movement] = None
movement_dict[movement] = None
# Now build the solver decision instances based on the previous
# grouping
......@@ -212,11 +212,18 @@ class SolverProcess(XMLObject, ActiveProcess):
index += 1
else:
new_decision = self.newContent(portal_type='Solver Decision')
new_decision._setDeliveryList(solver_decision_key[1])
new_decision._setDeliveryValueList(movement_dict.keys())
new_decision._setCausality(solver_decision_key[0])
for simulation_movement in movement_dict.keys():
simulation_movement.setSolverValueList(
simulation_movement.getSolverValueList() + [new_decision])
# XXX We need a relation between Simulation Movement and Solver
# Process, but ideally, the relation should be created when a
# Target Solver processes, not when a Solver Decision is
# created.
# for movement in movement_dict.keys():
# for simulation_movement in movement.getDeliveryRelatedValueList():
# solver_list = simulation_movement.getSolverValueList()
# if self not in solver_list:
# simulation_movement.setSolverValueList(
# solver_list + [self])
# XXX what should we do for non-matched existing solver decisions?
# do we need to cancel them by using an appropriate workflow?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment