[Erp5-report] r33373 nicolas.dumazet - in /erp5/trunk/bt5/erp5_pdm: WorkflowTemplateItem/po...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 4 10:17:04 CET 2010


Author: nicolas.dumazet
Date: Thu Mar  4 10:17:03 2010
New Revision: 33373

URL: http://svn.erp5.org?rev=33373&view=rev
Log:
* triggering on newContent is not required and actually causes issues:
  - calling the workflow when a line is added is premature, because
    the line is probably not set up correctly
  - _setResource* on the line will trigger the proper action later on
* correct typo on interaction name
* check that resource is not None


Added:
    erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml
Removed:
    erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml
Modified:
    erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml
    erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml
    erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml
    erp5/trunk/bt5/erp5_pdm/bt/revision

Added: erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml?rev=33373&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml (added)
+++ erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml [utf8] Thu Mar  4 10:17:03 2010
@@ -1,0 +1,101 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>actbox_category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_name</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_url</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>activate_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>after_script_name</string> </key>
+            <value>
+              <list>
+                <string>TransformationDescendant_reindexTransformationResource</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>before_commit_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>guard</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>TransformationDescendant_reindexTransformationResource</string> </value>
+        </item>
+        <item>
+            <key> <string>method_id</string> </key>
+            <value>
+              <list>
+                <string>_setResource.*</string>
+                <string>_setQuantity</string>
+                <string>_setVariation.*</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>
+              <list>
+                <string>Transformation Operation</string>
+                <string>Transformation Operation Cell</string>
+                <string>Transformation Optional Resource</string>
+                <string>Transformation Transformed Resource</string>
+                <string>Transformation Transformed Resource Cell</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>trigger_type</string> </key>
+            <value> <int>2</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml?rev=33373&r1=33372&r2=33373&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml [utf8] Thu Mar  4 10:17:03 2010
@@ -59,7 +59,6 @@
             <key> <string>method_id</string> </key>
             <value>
               <list>
-                <string>newContent</string>
                 <string>_setVariationBaseCategory.*</string>
                 <string>_setVersion</string>
               </list>
@@ -67,7 +66,7 @@
         </item>
         <item>
             <key> <string>once_per_transaction</string> </key>
-            <value> <int>0</int> </value>
+            <value> <int>1</int> </value>
         </item>
         <item>
             <key> <string>portal_type_filter</string> </key>

Removed: erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml?rev=33372&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml (removed)
@@ -1,101 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>actbox_category</string> </key>
-            <value> <string>workflow</string> </value>
-        </item>
-        <item>
-            <key> <string>actbox_name</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>actbox_url</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>activate_script_name</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>after_script_name</string> </key>
-            <value>
-              <list>
-                <string>TransformationDescendant_reindexTransformationResource</string>
-              </list>
-            </value>
-        </item>
-        <item>
-            <key> <string>before_commit_script_name</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>description</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>guard</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>ransformationDescendant_reindexTransformationResource</string> </value>
-        </item>
-        <item>
-            <key> <string>method_id</string> </key>
-            <value>
-              <list>
-                <string>_setResource.*</string>
-                <string>_setQuantity</string>
-                <string>_setVariation.*</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>
-              <list>
-                <string>Transformation Operation</string>
-                <string>Transformation Operation Cell</string>
-                <string>Transformation Optional Resource</string>
-                <string>Transformation Transformed Resource</string>
-                <string>Transformation Transformed Resource Cell</string>
-              </list>
-            </value>
-        </item>
-        <item>
-            <key> <string>script_name</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>trigger_type</string> </key>
-            <value> <int>2</int> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Modified: erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml?rev=33373&r1=33372&r2=33373&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml [utf8] Thu Mar  4 10:17:03 2010
@@ -61,7 +61,8 @@
   transformation = transformation.getParentValue()\n
 \n
 resource = transformation.getResourceValue()\n
-resource.reindexObject()\n
+if resource is not None:\n
+    resource.reindexObject()\n
 </string> </value>
         </item>
         <item>
@@ -103,6 +104,7 @@
                             <string>transformation</string>
                             <string>_getattr_</string>
                             <string>resource</string>
+                            <string>None</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml?rev=33373&r1=33372&r2=33373&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml [utf8] Thu Mar  4 10:17:03 2010
@@ -53,7 +53,11 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>state_change[\'object\'].getResourceValue().reindexObject()\n
+            <value> <string>transformation = state_change[\'object\']\n
+resource = transformation.getResourceValue()\n
+\n
+if resource is not None:\n
+  resource.reindexObject()\n
 </string> </value>
         </item>
         <item>
@@ -91,8 +95,11 @@
                         <value>
                           <tuple>
                             <string>state_change</string>
+                            <string>_getitem_</string>
+                            <string>transformation</string>
                             <string>_getattr_</string>
-                            <string>_getitem_</string>
+                            <string>resource</string>
+                            <string>None</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_pdm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/bt/revision?rev=33373&r1=33372&r2=33373&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/bt/revision [utf8] Thu Mar  4 10:17:03 2010
@@ -1,1 +1,1 @@
-457
+458




More information about the Erp5-report mailing list