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): ...@@ -189,7 +189,7 @@ class SolverProcess(XMLObject, ActiveProcess):
application_list.sort() application_list.sort()
solver_decision_key = (divergence_tester.getRelativeUrl(), tuple(application_list)) solver_decision_key = (divergence_tester.getRelativeUrl(), tuple(application_list))
movement_dict = solver_decision_dict.setdefault(solver_decision_key, {}) 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 # Now build the solver decision instances based on the previous
# grouping # grouping
...@@ -212,11 +212,18 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -212,11 +212,18 @@ class SolverProcess(XMLObject, ActiveProcess):
index += 1 index += 1
else: else:
new_decision = self.newContent(portal_type='Solver Decision') 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]) new_decision._setCausality(solver_decision_key[0])
for simulation_movement in movement_dict.keys(): # XXX We need a relation between Simulation Movement and Solver
simulation_movement.setSolverValueList( # Process, but ideally, the relation should be created when a
simulation_movement.getSolverValueList() + [new_decision]) # 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? # XXX what should we do for non-matched existing solver decisions?
# do we need to cancel them by using an appropriate workflow? # 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