From 87f26cfcc6ed969e3577a1d6abc8adf119ed9a9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 13 Jun 2008 11:22:30 +0000
Subject: [PATCH] rule_interaction_workflow: Add an interaction on _set.*
 instead of edit.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21573 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../rule_interaction_workflow/interactions.xml      |  7 ++-----
 .../interactions/Predicate_edit_updateMatrix.xml    | 13 +++++++------
 .../Rule_deleteContent_updateMatrix.xml             |  7 ++-----
 .../interactions/Rule_installation_updateMatrix.xml |  7 ++-----
 .../rule_interaction_workflow/scripts.xml           |  7 ++-----
 .../scripts/Predicate_updateMatrix.xml              |  7 ++-----
 .../scripts/Rule_updateMatrix.xml                   |  7 ++-----
 .../rule_interaction_workflow/variables.xml         |  7 ++-----
 .../variables/delivery_value.xml                    |  7 ++-----
 .../rule_interaction_workflow/worklists.xml         |  7 ++-----
 .../portal_workflow/rule_validation_workflow.xml    |  6 ++++++
 product/ERP5/bootstrap/erp5_core/bt/revision        |  2 +-
 12 files changed, 32 insertions(+), 52 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions.xml
index 7d8c51003b..879a78b540 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5.Interaction</string>
-          <string>Interaction</string>
-        </tuple>
-        <none/>
+        <global name="Interaction" module="Products.ERP5.Interaction"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Predicate_edit_updateMatrix.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Predicate_edit_updateMatrix.xml
index f542b32127..b91f7cc0c9 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Predicate_edit_updateMatrix.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Predicate_edit_updateMatrix.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5.Interaction</string>
-          <string>InteractionDefinition</string>
-        </tuple>
-        <none/>
+        <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -62,10 +59,14 @@
             <key> <string>method_id</string> </key>
             <value>
               <list>
-                <string>edit</string>
+                <string>_set.*</string>
               </list>
             </value>
         </item>
+        <item>
+            <key> <string>once_per_transaction</string> </key>
+            <value> <int>1</int> </value>
+        </item>
         <item>
             <key> <string>portal_type_filter</string> </key>
             <value>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml
index 8709c2c567..c15a0bcc8e 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5.Interaction</string>
-          <string>InteractionDefinition</string>
-        </tuple>
-        <none/>
+        <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml
index 9b05ac30e7..81e6dafc80 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5.Interaction</string>
-          <string>InteractionDefinition</string>
-        </tuple>
-        <none/>
+        <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts.xml
index 01ba35bf25..66683dde04 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Scripts</string>
-          <string>Scripts</string>
-        </tuple>
-        <none/>
+        <global name="Scripts" module="Products.DCWorkflow.Scripts"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml
index d8df167b68..616a3baad7 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml
index 32f38c1138..3edaa069cd 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables.xml
index 07046d72fe..7d9ea0fae8 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Variables</string>
-          <string>Variables</string>
-        </tuple>
-        <none/>
+        <global name="Variables" module="Products.DCWorkflow.Variables"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables/delivery_value.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables/delivery_value.xml
index 8938f31cdd..ea7b129c52 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables/delivery_value.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/variables/delivery_value.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Variables</string>
-          <string>VariableDefinition</string>
-        </tuple>
-        <none/>
+        <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/worklists.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/worklists.xml
index f4c2789633..3953ad0209 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/worklists.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/worklists.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Worklists</string>
-          <string>Worklists</string>
-        </tuple>
-        <none/>
+        <global name="Worklists" module="Products.DCWorkflow.Worklists"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_validation_workflow.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_validation_workflow.xml
index 5c2c20402a..8a3ce401ef 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_validation_workflow.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_validation_workflow.xml
@@ -21,6 +21,12 @@
               <tuple/>
             </value>
         </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
         <item>
             <key> <string>creation_guard</string> </key>
             <value>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 147d4e7f1d..203bd07e6d 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-845
\ No newline at end of file
+846
\ No newline at end of file
-- 
2.30.9