From 1c71f5174161b090b15ac6574e3f4124d096077e Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Tue, 2 Jun 2009 19:37:59 +0000 Subject: [PATCH] wait for '(delivery_path)_expand' tag to prevent 'Delivery xxx has more than one applied rule.' problem. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27338 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../DeliveryMovement_updateSimulation.xml | 15 +++++++++++---- .../scripts/Delivery_updateSimulation.xml | 19 +++++++++++++------ bt5/erp5_base/bt/revision | 2 +- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_updateSimulation.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_updateSimulation.xml index 423d4bc6bf..c726da0df1 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_updateSimulation.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_updateSimulation.xml @@ -55,8 +55,10 @@ <key> <string>_body</string> </key> <value> <string>delivery = state_change[\'object\'].getExplanationValue()\n \n -path_and_method_id = (delivery.getPath(), (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n -expand_tag = delivery.getPath() + \'_updateAppliedRule\'\n +delivery_path = delivery.getPath()\n +path_and_method_id = (delivery_path, (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n +afer_tag = delivery_path + \'_expand\'\n +tag = delivery_path + \'_updateAppliedRule\'\n \n priority = 3\n \n @@ -66,7 +68,8 @@ activate_kw = { \n }\n delivery.activate(\n after_path_and_method_id=path_and_method_id,\n - tag=expand_tag,\n + after_tag=after_tag,\n + tag=tag,\n priority=priority,\n ).Delivery_updateAppliedRule(activate_kw=activate_kw)\n </string> </value> @@ -109,10 +112,14 @@ delivery.activate(\n <string>_getattr_</string> <string>_getitem_</string> <string>delivery</string> + <string>delivery_path</string> <string>path_and_method_id</string> - <string>expand_tag</string> + <string>afer_tag</string> + <string>tag</string> <string>priority</string> + <string>expand_tag</string> <string>activate_kw</string> + <string>after_tag</string> </tuple> </value> </item> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_simulation_interaction_workflow/scripts/Delivery_updateSimulation.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_simulation_interaction_workflow/scripts/Delivery_updateSimulation.xml index 9ac0d19b4e..56630e6444 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_simulation_interaction_workflow/scripts/Delivery_updateSimulation.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_simulation_interaction_workflow/scripts/Delivery_updateSimulation.xml @@ -53,10 +53,12 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>delivery = state_change[\'object\']\n + <value> <string>delivery = state_change[\'object\'].getExplanationValue()\n \n -path_and_method_id = (delivery.getPath(), (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n -expand_tag = delivery.getPath() + \'_updateAppliedRule\'\n +delivery_path = delivery.getPath()\n +path_and_method_id = (delivery_path, (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n +afer_tag = delivery_path + \'_expand\'\n +tag = delivery_path + \'_updateAppliedRule\'\n \n priority = 3\n \n @@ -66,7 +68,8 @@ activate_kw = { \n }\n delivery.activate(\n after_path_and_method_id=path_and_method_id,\n - tag=expand_tag,\n + after_tag=after_tag,\n + tag=tag,\n priority=priority,\n ).Delivery_updateAppliedRule(activate_kw=activate_kw)\n </string> </value> @@ -106,13 +109,17 @@ delivery.activate(\n <value> <tuple> <string>state_change</string> + <string>_getattr_</string> <string>_getitem_</string> <string>delivery</string> - <string>_getattr_</string> + <string>delivery_path</string> <string>path_and_method_id</string> - <string>expand_tag</string> + <string>afer_tag</string> + <string>tag</string> <string>priority</string> + <string>expand_tag</string> <string>activate_kw</string> + <string>after_tag</string> </tuple> </value> </item> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 4af6ab79ff..316941dd7d 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -598 \ No newline at end of file +599 \ No newline at end of file -- 2.30.9