[Erp5-report] r10419 - in /erp5/trunk/bt5/erp5_dms: WorkflowTemplateItem/portal_workflow/dm...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 28 21:40:57 CEST 2006
Author: bartek
Date: Thu Sep 28 21:40:45 2006
New Revision: 10419
URL: http://svn.erp5.org?rev=10419&view=rev
Log:
tidied up interaction workflows (bugfixes, logical naming)
Added:
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Nonregistered_file_edit.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Registered_file_edit.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckKnownType.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckUnKnownType.xml
Modified:
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/ClearCacheUponUpload.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/interactions/OOo_edit.xml
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/scripts/OOo_edit.xml
erp5/trunk/bt5/erp5_dms/bt/revision
Added: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Nonregistered_file_edit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Nonregistered_file_edit.xml?rev=10419&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Nonregistered_file_edit.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Nonregistered_file_edit.xml Thu Sep 28 21:40:45 2006
@@ -1,0 +1,94 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Products.ERP5.Interaction</string>
+ <string>InteractionDefinition</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <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>
+ <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>Nonregistered_file_edit</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_edit</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>portal_type_filter</string> </key>
+ <value>
+ <list>
+ <string>DMS File</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <list>
+ <string>CheckUnKnownType</string>
+ </list>
+ </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>
Added: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Registered_file_edit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Registered_file_edit.xml?rev=10419&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Registered_file_edit.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/interactions/Registered_file_edit.xml Thu Sep 28 21:40:45 2006
@@ -1,0 +1,99 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Products.ERP5.Interaction</string>
+ <string>InteractionDefinition</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <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>
+ <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>Registered_file_edit</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_edit</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>portal_type_filter</string> </key>
+ <value>
+ <list>
+ <string>Graphic</string>
+ <string>ImageDocument</string>
+ <string>PdfDocument</string>
+ <string>Presentation</string>
+ <string>Spreadsheet</string>
+ <string>Text</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <list>
+ <string>CheckKnownType</string>
+ </list>
+ </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>
Added: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckKnownType.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckKnownType.xml?rev=10419&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckKnownType.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckKnownType.xml Thu Sep 28 21:40:45 2006
@@ -1,0 +1,164 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Products.PythonScripts.PythonScript</string>
+ <string>PythonScript</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>ob=state_change.object\n
+kw=ob.REQUEST\n
+f=kw.get(\'my_file\',None)\n
+\n
+if f is not None and f:\n
+ # if file uploaded, then:\n
+ fname=f.filename\n
+ # we check for appropriate file type (by extension, using content_type_registry)\n
+ # we accept or suggest appropriate portal type\n
+ ctype=context.content_type_registry.findTypeName(fname,None,None)\n
+ if ctype is None:\n
+ raise Exception(\'This file should be created as DMS File\')\n
+ if ctype!=ob.getPortalType():\n
+ raise Exception(\'This file should be created as \'+ctype)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>state_change</string>
+ <string>_getattr_</string>
+ <string>ob</string>
+ <string>kw</string>
+ <string>None</string>
+ <string>f</string>
+ <string>fname</string>
+ <string>context</string>
+ <string>ctype</string>
+ <string>Exception</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>CheckKnownType</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckUnKnownType.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckUnKnownType.xml?rev=10419&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckUnKnownType.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/CheckUnKnownType.xml Thu Sep 28 21:40:45 2006
@@ -1,0 +1,162 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Products.PythonScripts.PythonScript</string>
+ <string>PythonScript</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>ob=state_change.object\n
+kw=ob.REQUEST\n
+f=kw.get(\'my_file\',None)\n
+\n
+if f is not None and f:\n
+ # if file uploaded, then:\n
+ fname=f.filename\n
+ # we check for appropriate file type (by extension, using content_type_registry)\n
+ # we allow only not known types\n
+ ctype=context.content_type_registry.findTypeName(fname,None,None)\n
+ if ctype is not None:\n
+ raise Exception(\'This file should be created as \'+ctype)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>state_change</string>
+ <string>_getattr_</string>
+ <string>ob</string>
+ <string>kw</string>
+ <string>None</string>
+ <string>f</string>
+ <string>fname</string>
+ <string>context</string>
+ <string>ctype</string>
+ <string>Exception</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>CheckUnKnownType</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/ClearCacheUponUpload.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/ClearCacheUponUpload.xml?rev=10419&r1=10418&r2=10419&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/ClearCacheUponUpload.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/dms_file_interaction_workflow/scripts/ClearCacheUponUpload.xml Thu Sep 28 21:40:45 2006
@@ -76,7 +76,8 @@
\n
if f is not None and f:\n
# if file uploaded, then:\n
- ob.clearCache()\n
+ if hasattr(ob,\'clearCache\'): # e.g. DMS File doesnt have it\n
+ ob.clearCache()\n
</string> </value>
</item>
<item>
@@ -125,6 +126,7 @@
<string>kw</string>
<string>None</string>
<string>f</string>
+ <string>hasattr</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/interactions/OOo_edit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/interactions/OOo_edit.xml?rev=10419&r1=10418&r2=10419&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/interactions/OOo_edit.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/interactions/OOo_edit.xml Thu Sep 28 21:40:45 2006
@@ -33,9 +33,7 @@
<item>
<key> <string>activate_script_name</string> </key>
<value>
- <list>
- <string>Convert_after</string>
- </list>
+ <tuple/>
</value>
</item>
<item>
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/scripts/OOo_edit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/scripts/OOo_edit.xml?rev=10419&r1=10418&r2=10419&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/scripts/OOo_edit.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/ooo_interaction_workflow/scripts/OOo_edit.xml Thu Sep 28 21:40:45 2006
@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string>ob=state_change.object\n
kw=ob.REQUEST\n
-metafields=(\'title\',\'subject\',\'keywords\',\'description\',\'reference\',\'version\',\'language\')\n
+metafields=(\'title\',\'subject\',\'description\',\'reference\',\'version\',\'language\')\n
f=kw.get(\'my_file\',None)\n
\n
# edit metadata (only if we have OOo file)\n
@@ -83,17 +83,6 @@
if newmeta:\n
# edit metadata via server\n
ob.editMetadata(newmeta)\n
-if f is not None and f:\n
- # if file uploaded, then:\n
- context.log(f)\n
- fname=f.filename\n
- # we check for appropriate file type (by extension, using content_type_registry)\n
- ctype=context.content_type_registry.findTypeName(fname,None,None)\n
- if ctype is None:\n
- raise Exception(\'File type of \'+fname+\' is not registered\')\n
- if ctype!=ob.getPortalType():\n
- raise Exception(\'This file should be created as \'+ctype)\n
- ob.reset()\n
</string> </value>
</item>
<item>
@@ -149,10 +138,6 @@
<string>keymf</string>
<string>_getitem_</string>
<string>_write_</string>
- <string>context</string>
- <string>fname</string>
- <string>ctype</string>
- <string>Exception</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=10419&r1=10418&r2=10419&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision Thu Sep 28 21:40:45 2006
@@ -1,1 +1,1 @@
-212
+218
More information about the Erp5-report
mailing list