From 2222bd5a753ef798321b5325db81ec0090795bbf Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 22 Jun 2010 16:04:04 +0000
Subject: [PATCH] add more comments on current issues.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36522 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Tool/SolverProcessTool.py | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/product/ERP5/Tool/SolverProcessTool.py b/product/ERP5/Tool/SolverProcessTool.py
index 7215d398ed..4665486e46 100644
--- a/product/ERP5/Tool/SolverProcessTool.py
+++ b/product/ERP5/Tool/SolverProcessTool.py
@@ -83,6 +83,8 @@ class SolverProcessTool(BaseTool):
                             or a list thereof
     """
     # Do not create a new solver process if no divergence
+    # XXX (possible performance issue) Here it calls all divergence
+    # testers, but they should be called later.
     if not self.isDivergent(delivery_or_movement=delivery_or_movement):
       return None
 
@@ -93,10 +95,13 @@ class SolverProcessTool(BaseTool):
     new_solver.buildSolverDecisionList(delivery_or_movement=delivery_or_movement,
                                        temp_object=temp_object)
 
-    # Append the solver process into the delivery's solver category
-    delivery = delivery_or_movement.getRootDeliveryValue()
-    solver_list = delivery.getSolverValueList()
-    solver_list.append(new_solver)
-    delivery.setSolverValueList(solver_list)
-    return new_solver
-
+    if not temp_object:
+      # Append the solver process into the delivery's solver category
+      # XXX using delivery's solver category is not so good idea,
+      # because we might want to solve several deliveries with one
+      # solver process, several users want to solve one document etc.
+      delivery = delivery_or_movement.getRootDeliveryValue()
+      solver_list = delivery.getSolverValueList()
+      solver_list.append(new_solver)
+      delivery.setSolverValueList(solver_list)
+      return new_solver
-- 
2.30.9