[Erp5-report] r9933 - /erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/documen...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 14 19:04:31 CEST 2006
Author: bartek
Date: Thu Sep 14 19:04:29 2006
New Revision: 9933
URL: http://svn.erp5.org?rev=9933&view=rev
Log:
Implemented publication workflow side effects
Modified:
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml?rev=9933&r1=9932&r2=9933&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml Thu Sep 14 19:04:29 2006
@@ -68,7 +68,19 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string></string> </value>
+ <value> <string>o=state_change.object\n
+ref=o.getReference()\n
+if ref is None: # this shouldn\'t happen\n
+ raise Exception(\'how on earth can reference be None?\')\n
+lng=o.getLanguage()\n
+if lng is None: # ibidem\n
+ raise Exception(\'how on earth can language be None?\')\n
+res=context.portal_catalog(reference=ref,portal_type=o.getPortalType(),simulation_state=\'published\')\n
+res=[r.getObject() for r in res]\n
+res=filter(lambda o:o.getLanguage()==lng,res)\n
+for ob in res: # again, this should never happen, but still\n
+ o.portal_workflow.doActionFor(ob,\'archive_action\')\n
+</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -111,6 +123,20 @@
<value>
<tuple>
<string>state_change</string>
+ <string>_getattr_</string>
+ <string>o</string>
+ <string>ref</string>
+ <string>None</string>
+ <string>Exception</string>
+ <string>lng</string>
+ <string>context</string>
+ <string>res</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>r</string>
+ <string>filter</string>
+ <string>ob</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml?rev=9933&r1=9932&r2=9933&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml Thu Sep 14 19:04:29 2006
@@ -68,7 +68,19 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string></string> </value>
+ <value> <string>o=state_change.object\n
+ref=o.getReference()\n
+if ref is None: # this shouldn\'t happen\n
+ raise Exception(\'how on earth can reference be None?\')\n
+lng=o.getLanguage()\n
+if lng is None: # ibidem\n
+ raise Exception(\'how on earth can language be None?\')\n
+res=context.portal_catalog(reference=ref,portal_type=o.getPortalType(),simulation_state=\'released\')\n
+res=[r.getObject() for r in res]\n
+res=filter(lambda o:o.getLanguage()==lng,res)\n
+for ob in res: # again, this should never happen, but still\n
+ o.portal_workflow.doActionFor(ob,\'archive_action\')\n
+</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -111,6 +123,20 @@
<value>
<tuple>
<string>state_change</string>
+ <string>_getattr_</string>
+ <string>o</string>
+ <string>ref</string>
+ <string>None</string>
+ <string>Exception</string>
+ <string>lng</string>
+ <string>context</string>
+ <string>res</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>r</string>
+ <string>filter</string>
+ <string>ob</string>
</tuple>
</value>
</item>
More information about the Erp5-report
mailing list