[Erp5-report] r29503 - in /erp5/trunk/bt5/erp5_web: WorkflowTemplateItem/portal_workflow/ca...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 9 10:30:46 CEST 2009
Author: luke
Date: Fri Oct 9 10:30:46 2009
New Revision: 29503
URL: http://svn.erp5.org?rev=29503&view=rev
Log:
- use new workflow API method isTransitionPossible instead of blindly trying to invoke every transition
Modified:
erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml
erp5/trunk/bt5/erp5_web/bt/revision
Modified: erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml [utf8] Fri Oct 9 10:30:46 2009
@@ -55,10 +55,14 @@
<key> <string>_body</string> </key>
<value> <string>object = state_change[\'object\']\n
\n
-# Try all expire methods\n
-object.expire()\n
-object.expireProtected()\n
-object.expirePublished()\n
+if context.isTransitionPossible(object, \'expire\'):\n
+ object.expire()\n
+\n
+if context.isTransitionPossible(object, \'expire_protected\'):\n
+ object.expireProtected()\n
+\n
+if context.isTransitionPossible(object, \'expire_published\'):\n
+ object.expirePublished()\n
</string> </value>
</item>
<item>
@@ -99,6 +103,7 @@
<string>_getitem_</string>
<string>object</string>
<string>_getattr_</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=29503&r1=29502&r2=29503&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision [utf8] Fri Oct 9 10:30:46 2009
@@ -1,1 +1,1 @@
-858
+859
More information about the Erp5-report
mailing list