From 3524df42ddff896705bd7c04f92288785f3ad2b7 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Wed, 12 May 2010 17:09:54 +0000 Subject: [PATCH] 2010-05-12 nicolas * add document_conversion_interaction_workflow * add document_security_interaction_workflow * move process_status_workflow from erp5_dms because Notification Message need it. * move contributor base_category from erp5_dms because Notification Message need it. * cached_convertible_interaction_workflow is replaced by new interaction workflow git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35253 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_categories/contributor.xml | 246 ++++++++++++++++++ .../workflow_chain_type.xml | 6 +- ...cument_conversion_interaction_workflow.xml | 49 ++++ .../interactions.xml | 0 .../Document_base_convertable.xml | 128 +++++++++ .../Document_base_convertable_edit.xml | 98 +++++++ .../Document_cached_convertable.xml | 94 +++++++ .../interactions/Document_file.xml} | 7 +- .../scripts.xml | 0 .../scripts/Document_convertToBaseFormat.xml | 141 ++++++++++ .../scripts/Document_guessMimeType.xml | 125 +++++++++ .../scripts/Document_upload.xml | 126 +++++++++ .../scripts/OOoDocument_updateMetadata.xml | 173 ++++++++++++ .../scripts/updateContentMd5.xml | 2 + .../variables.xml | 0 .../worklists.xml | 0 ...document_security_interaction_workflow.xml | 49 ++++ .../interactions.xml} | 10 +- .../interactions/Document_edit.xml | 102 ++++++++ .../interactions/Document_setContributor.xml | 104 ++++++++ .../scripts.xml | 31 +++ .../scripts/Document_setContributor.xml | 146 +++++++++++ .../scripts/updateLocalRoles.xml | 131 ++++++++++ .../variables.xml | 25 ++ .../worklists.xml | 25 ++ .../processing_status_workflow.xml | 63 +++++ .../processing_status_workflow/scripts.xml | 31 +++ .../scripts/Document_convertToBaseFormat.xml | 128 +++++++++ .../processing_status_workflow/states.xml | 31 +++ .../states/conversion_failed.xml | 43 +++ .../states/converted.xml | 43 +++ .../states/converting.xml | 45 ++++ .../states/empty.xml | 43 +++ .../states/uploaded.xml | 44 ++++ .../transitions.xml | 31 +++ .../transitions/conversion_failed.xml | 61 +++++ .../transitions/convert_action.xml | 103 ++++++++ .../transitions/convert_file.xml | 61 +++++ .../transitions/detect_converted_file.xml | 95 +++++++ .../transitions/detect_uploaded_file.xml | 103 ++++++++ .../transitions/process_conversion_failed.xml | 61 +++++ .../transitions/process_file.xml | 95 +++++++ .../transitions/update_file_metadata.xml | 61 +++++ .../transitions/upload_file.xml | 61 +++++ .../processing_status_workflow/variables.xml | 31 +++ .../variables/action.xml | 70 +++++ .../variables/actor.xml | 70 +++++ .../variables/comment.xml | 70 +++++ .../variables/error_message.xml | 51 ++++ .../variables/history.xml | 70 +++++ .../variables/portal_type.xml | 51 ++++ .../variables/serial.xml | 70 +++++ .../variables/time.xml | 70 +++++ .../processing_status_workflow/worklists.xml | 25 ++ bt5/erp5_base/bt/change_log | 6 + bt5/erp5_base/bt/revision | 2 +- bt5/erp5_base/bt/template_base_category_list | 1 + .../template_portal_type_workflow_chain_list | 10 +- bt5/erp5_base/bt/template_workflow_id_list | 4 +- 59 files changed, 3605 insertions(+), 17 deletions(-) create mode 100644 bt5/erp5_base/CategoryTemplateItem/portal_categories/contributor.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow.xml rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow => document_conversion_interaction_workflow}/interactions.xml (100%) create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable_edit.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_cached_convertable.xml rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow/interactions/Document_updateContentMd5.xml => document_conversion_interaction_workflow/interactions/Document_file.xml} (93%) rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow => document_conversion_interaction_workflow}/scripts.xml (100%) create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_convertToBaseFormat.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_upload.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/OOoDocument_updateMetadata.xml rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow => document_conversion_interaction_workflow}/scripts/updateContentMd5.xml (99%) rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow => document_conversion_interaction_workflow}/variables.xml (100%) rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow => document_conversion_interaction_workflow}/worklists.xml (100%) create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow.xml rename bt5/erp5_base/WorkflowTemplateItem/portal_workflow/{cached_convertible_interaction_workflow.xml => document_security_interaction_workflow/interactions.xml} (67%) create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_edit.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_setContributor.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/Document_setContributor.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/updateLocalRoles.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/variables.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/worklists.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts/Document_convertToBaseFormat.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/conversion_failed.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converted.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converting.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/empty.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/uploaded.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/conversion_failed.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_action.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_file.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_converted_file.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_uploaded_file.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_conversion_failed.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_file.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/update_file_metadata.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/upload_file.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/action.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/actor.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/comment.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/error_message.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/history.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/portal_type.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/serial.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/time.xml create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/worklists.xml diff --git a/bt5/erp5_base/CategoryTemplateItem/portal_categories/contributor.xml b/bt5/erp5_base/CategoryTemplateItem/portal_categories/contributor.xml new file mode 100644 index 0000000000..3b23ec7ad4 --- /dev/null +++ b/bt5/erp5_base/CategoryTemplateItem/portal_categories/contributor.xml @@ -0,0 +1,246 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="BaseCategory" module="Products.ERP5Type.Document.BaseCategory"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>_count</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>_mt_index</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>_tree</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>acquisition_append_value</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>acquisition_base_category</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>acquisition_copy_value</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>acquisition_mask_value</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>acquisition_object_id</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>acquisition_portal_type</string> </key> + <value> <string>python: []</string> </value> + </item> + <item> + <key> <string>acquisition_sync_value</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>contributor</string> + </tuple> + </value> + </item> + <item> + <key> <string>category_type</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>criterion_property</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>fallback_base_category</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>contributor</string> </value> + </item> + <item> + <key> <string>id_generator</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id_group</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>last_id</string> </key> + <value> <string>1</string> </value> + </item> + <item> + <key> <string>membership_criterion_base_category</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>membership_criterion_category</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>multimembership_criterion_base_category</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Base Category</string> </value> + </item> + <item> + <key> <string>read_permission</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>rid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>short_title</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>test_method_id</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Contributor</string> </value> + </item> + <item> + <key> <string>write_permission</string> </key> + <value> + <none/> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Length" module="BTrees.Length"/> + </pickle> + <pickle> <int>0</int> </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="OOBTree" module="BTrees._OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <global name="OOBTree" module="BTrees._OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 9b9c1dadb4..8b73f105f7 100644 --- a/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -49,11 +49,11 @@ </chain> <chain> <type>File</type> - <workflow>cached_convertible_interaction_workflow, edit_workflow</workflow> + <workflow>document_conversion_interaction_workflow, document_security_interaction_workflow, edit_workflow</workflow> </chain> <chain> <type>Image</type> - <workflow>cached_convertible_interaction_workflow, edit_workflow</workflow> + <workflow>document_conversion_interaction_workflow, document_security_interaction_workflow, edit_workflow</workflow> </chain> <chain> <type>Link</type> @@ -61,7 +61,7 @@ </chain> <chain> <type>Notification Message</type> - <workflow>cached_convertible_interaction_workflow, edit_workflow, notification_message_workflow</workflow> + <workflow>document_conversion_interaction_workflow, document_security_interaction_workflow, edit_workflow, notification_message_workflow, processing_status_workflow</workflow> </chain> <chain> <type>Organisation</type> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow.xml new file mode 100644 index 0000000000..ecadd37e2a --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>creation_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>document_conversion_interaction_workflow</string> </value> + </item> + <item> + <key> <string>manager_bypass</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Interaction about conversion of documents</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/interactions.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions.xml similarity index 100% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/interactions.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions.xml diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable.xml new file mode 100644 index 0000000000..c85e3dfbe4 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable.xml @@ -0,0 +1,128 @@ +<?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>Document_convertToBaseFormat</string> + <string>Document_upload</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>File and base_convertible API</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Document_base_convertable</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_setFile</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <none/> + </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> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>here/isSupportBaseDataConversion</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable_edit.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable_edit.xml new file mode 100644 index 0000000000..beb030d011 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_base_convertable_edit.xml @@ -0,0 +1,98 @@ +<?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>OOoDocument_updateMetadata</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>Document_base_convertable_edit</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>edit</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Drawing</string> + <string>Presentation</string> + <string>Spreadsheet</string> + <string>Text</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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_cached_convertable.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_cached_convertable.xml new file mode 100644 index 0000000000..c1cc232e93 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_cached_convertable.xml @@ -0,0 +1,94 @@ +<?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>updateContentMd5</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>Document_cached_convertable</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_setFile</string> + <string>_setTextContent</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <none/> + </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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/interactions/Document_updateContentMd5.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_file.xml similarity index 93% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/interactions/Document_updateContentMd5.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_file.xml index c39d687887..cedfa5a075 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/interactions/Document_updateContentMd5.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/interactions/Document_file.xml @@ -31,7 +31,7 @@ <key> <string>after_script_name</string> </key> <value> <list> - <string>updateContentMd5</string> + <string>Document_guessMimeType</string> </list> </value> </item> @@ -53,14 +53,13 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>Document_updateContentMd5</string> </value> + <value> <string>Document_file</string> </value> </item> <item> <key> <string>method_id</string> </key> <value> <list> <string>_setFile</string> - <string>_setTextContent</string> </list> </value> </item> @@ -120,7 +119,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>not:here/isTempObject</string> </value> + <value> <string>here/hasSourceReference</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/scripts.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts.xml similarity index 100% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/scripts.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts.xml diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_convertToBaseFormat.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_convertToBaseFormat.xml new file mode 100644 index 0000000000..17459ae5a6 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_convertToBaseFormat.xml @@ -0,0 +1,141 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>document = state_change[\'object\']\n +\n +# calculate new conversion to base_format\n +document.processFile()\n +\n +if document.getMetaType() == \'ERP5 OOo Document\':\n + # XXX How to filter documents which are implementing base_convertable \n + # and not text_document\n + # Clear base_data\n + document.setBaseData(None)\n + tag = \'document_%s_convert\' % document.getPath()\n + document.activate(tag=tag).Document_tryToConvertToBaseFormat()\n +else:\n + # do not run it in activity but not with try except statement\n + # Transaction must fail, otherwise data will be lost\n + document.convertToBaseFormat()\n +</string> </value> + </item> + <item> + <key> <string>_code</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>_getitem_</string> + <string>document</string> + <string>_getattr_</string> + <string>None</string> + <string>tag</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>Document_convertToBaseFormat</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.xml new file mode 100644 index 0000000000..b66f58640c --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.xml @@ -0,0 +1,125 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>document = state_change[\'object\']\n +document.guessMimeType()\n +</string> </value> + </item> + <item> + <key> <string>_code</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>_getitem_</string> + <string>document</string> + <string>_getattr_</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>Document_guessMimeType</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_upload.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_upload.xml new file mode 100644 index 0000000000..96408a8418 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_upload.xml @@ -0,0 +1,126 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>document = state_change[\'object\']\n +if document.hasBaseData():\n + document.uploadFile()\n +</string> </value> + </item> + <item> + <key> <string>_code</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>_getitem_</string> + <string>document</string> + <string>_getattr_</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>Document_upload</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/OOoDocument_updateMetadata.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/OOoDocument_updateMetadata.xml new file mode 100644 index 0000000000..e96a63e955 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/OOoDocument_updateMetadata.xml @@ -0,0 +1,173 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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 encoding="cdata"><![CDATA[ + +"""\n +when OOoDocument is edited, we update metadata in the ODF file\n +\n +XXX - This script must be verified, written with clean syntax\n +"""\n +document = state_change[\'object\']\n +kw = state_change[\'kwargs\']\n +\n +# key is a name of erp5 field.\n +# value is a name of document metadata.\n +metadata_field_mapping_dict = document.getMetadataMappingDict()\n +\n +# edit metadata (only if we have OOo file)\n +if document.hasBaseData():\n + new_metadata = {}\n + for field in metadata_field_mapping_dict.keys():\n + value = kw.get(field, None)\n + if value is None:\n + value_list = kw.get(\'%s_list\' % field, None)\n + if value_list is not None:\n + if len(value_list)>0:\n + value = \' \'.join(map(str, value_list))\n + else:\n + value = \'\'\n + if value is not None:\n + metadata_key = metadata_field_mapping_dict[field]\n + new_metadata[metadata_key] = value\n + if new_metadata:\n + # edit metadata via server\n + after_tag = \'document_%s_convert\' % document.getPath()\n + document.activate(after_tag=after_tag).Document_tryToUpdateBaseMetadata(**new_metadata)\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</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>_getitem_</string> + <string>document</string> + <string>kw</string> + <string>_getattr_</string> + <string>metadata_field_mapping_dict</string> + <string>new_metadata</string> + <string>_getiter_</string> + <string>field</string> + <string>None</string> + <string>value</string> + <string>value_list</string> + <string>len</string> + <string>map</string> + <string>str</string> + <string>metadata_key</string> + <string>_write_</string> + <string>after_tag</string> + <string>_apply_</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>OOoDocument_updateMetadata</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/scripts/updateContentMd5.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/updateContentMd5.xml similarity index 99% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/scripts/updateContentMd5.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/updateContentMd5.xml index de7d06af31..9748dd2f95 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/scripts/updateContentMd5.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/updateContentMd5.xml @@ -54,6 +54,8 @@ <item> <key> <string>_body</string> </key> <value> <string>document = state_change[\'object\']\n +if document.isTempObject():\n + return\n document.updateContentMd5()\n </string> </value> </item> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/variables.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/variables.xml similarity index 100% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/variables.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/variables.xml diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/worklists.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/worklists.xml similarity index 100% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow/worklists.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/worklists.xml diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow.xml new file mode 100644 index 0000000000..6f06da57cf --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>creation_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This interaction workflow tracks uploads in an existing document and triggers appropriate conversion methods if necessary. It also tracks any edit made to a document and updates local roles / metadata.</string> </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>document_security_interaction_workflow</string> </value> + </item> + <item> + <key> <string>manager_bypass</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Document Interactions</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions.xml similarity index 67% rename from bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow.xml rename to bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions.xml index 21ed7da19c..6788072919 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/cached_convertible_interaction_workflow.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions.xml @@ -3,27 +3,27 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> + <global name="Interaction" module="Products.ERP5.Interaction"/> <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> - <key> <string>_objects</string> </key> + <key> <string>_mapping</string> </key> <value> - <tuple/> + <dictionary/> </value> </item> <item> - <key> <string>groups</string> </key> + <key> <string>_objects</string> </key> <value> <tuple/> </value> </item> <item> <key> <string>id</string> </key> - <value> <string>cached_convertible_interaction_workflow</string> </value> + <value> <string>interactions</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_edit.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_edit.xml new file mode 100644 index 0000000000..b4558f4a1e --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_edit.xml @@ -0,0 +1,102 @@ +<?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>updateLocalRoles</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>Document_edit</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_edit</string> + <string>submit</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Drawing</string> + <string>File</string> + <string>Image</string> + <string>PDF</string> + <string>Presentation</string> + <string>Spreadsheet</string> + <string>Text</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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_setContributor.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_setContributor.xml new file mode 100644 index 0000000000..435aef5b99 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/interactions/Document_setContributor.xml @@ -0,0 +1,104 @@ +<?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> + <tuple/> + </value> + </item> + <item> + <key> <string>before_commit_script_name</string> </key> + <value> + <list> + <string>Document_setContributor</string> + </list> + </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>Document_setContributor</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <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> + <list> + <string>Discussion Post</string> + <string>Discussion Thread</string> + <string>Drawing</string> + <string>File</string> + <string>Image</string> + <string>PDF</string> + <string>Presentation</string> + <string>Spreadsheet</string> + <string>Text</string> + <string>Web Page</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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts.xml new file mode 100644 index 0000000000..0622b3c34f --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Scripts" module="Products.DCWorkflow.Scripts"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>scripts</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/Document_setContributor.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/Document_setContributor.xml new file mode 100644 index 0000000000..cd4f3e135f --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/Document_setContributor.xml @@ -0,0 +1,146 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>"""\n + Add contributor to document if logged in user has a respective ERP5\n + Person object.\n +"""\n +document = state_change[\'object\']\n +contributor_list = document.getContributorValueList()\n +person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n +if person is not None and person not in contributor_list:\n + # a real ERP5 Person object does exist\n + contributor_list.append(person)\n + document.setContributorValueList(contributor_list)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>state_change</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </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>_getitem_</string> + <string>document</string> + <string>_getattr_</string> + <string>contributor_list</string> + <string>context</string> + <string>person</string> + <string>None</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>Document_setContributor</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/updateLocalRoles.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/updateLocalRoles.xml new file mode 100644 index 0000000000..8231925f71 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/scripts/updateLocalRoles.xml @@ -0,0 +1,131 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>state_change[\'object\'].updateLocalRolesOnSecurityGroups()\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>state_change</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </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>_getitem_</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>updateLocalRoles</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/variables.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/variables.xml new file mode 100644 index 0000000000..5547232278 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/variables.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Variables" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>variables</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/worklists.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/worklists.xml new file mode 100644 index 0000000000..1f8b17b012 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_security_interaction_workflow/worklists.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Worklists" module="Products.DCWorkflow.Worklists"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>worklists</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow.xml new file mode 100644 index 0000000000..c3a2d0633a --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>creation_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This workflow tracks changes to the current document as well as the state in the conversion process. It provides access to history through serial numbers.</string> </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>processing_status_workflow</string> </value> + </item> + <item> + <key> <string>initial_state</string> </key> + <value> <string>empty</string> </value> + </item> + <item> + <key> <string>manager_bypass</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>state_var</string> </key> + <value> <string>external_processing_state</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>External Processing Workflow</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts.xml new file mode 100644 index 0000000000..0622b3c34f --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Scripts" module="Products.DCWorkflow.Scripts"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>scripts</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts/Document_convertToBaseFormat.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts/Document_convertToBaseFormat.xml new file mode 100644 index 0000000000..b7cf2b3732 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/scripts/Document_convertToBaseFormat.xml @@ -0,0 +1,128 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>document = state_change[\'object\']\n +\n +if document.isSupportBaseDataConversion() and not document.hasBaseData():\n + document.processFile()\n + document.activate().convertToBaseFormat()\n +</string> </value> + </item> + <item> + <key> <string>_code</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>_getitem_</string> + <string>document</string> + <string>_getattr_</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>Document_convertToBaseFormat</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states.xml new file mode 100644 index 0000000000..a21bb6e959 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="States" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>states</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/conversion_failed.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/conversion_failed.xml new file mode 100644 index 0000000000..b022f6274b --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/conversion_failed.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="StateDefinition" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string>Conversion process failed from some reason</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>conversion_failed</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Conversion Failed</string> </value> + </item> + <item> + <key> <string>transitions</string> </key> + <value> + <tuple> + <string>convert_action</string> + <string>process_conversion_failed</string> + <string>process_file</string> + </tuple> + </value> + </item> + <item> + <key> <string>type_list</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converted.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converted.xml new file mode 100644 index 0000000000..908eb79622 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converted.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="StateDefinition" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string>State of the document when converted to an open document</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Converted</string> </value> + </item> + <item> + <key> <string>transitions</string> </key> + <value> + <tuple> + <string>process_file</string> + <string>update_file_metadata</string> + <string>upload_file</string> + </tuple> + </value> + </item> + <item> + <key> <string>type_list</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converting.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converting.xml new file mode 100644 index 0000000000..266a3512d0 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/converting.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="StateDefinition" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string>Indicates that the conversion of document to an open document is in process</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>converting</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Converting</string> </value> + </item> + <item> + <key> <string>transitions</string> </key> + <value> + <tuple> + <string>conversion_failed</string> + <string>convert_action</string> + <string>convert_file</string> + <string>process_file</string> + <string>upload_file</string> + </tuple> + </value> + </item> + <item> + <key> <string>type_list</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/empty.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/empty.xml new file mode 100644 index 0000000000..b4a6c62065 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/empty.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="StateDefinition" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string>default state of the document in the converting process</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>empty</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Empty</string> </value> + </item> + <item> + <key> <string>transitions</string> </key> + <value> + <tuple> + <string>detect_uploaded_file</string> + <string>process_file</string> + <string>upload_file</string> + </tuple> + </value> + </item> + <item> + <key> <string>type_list</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/uploaded.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/uploaded.xml new file mode 100644 index 0000000000..9969c1f9b7 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/states/uploaded.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="StateDefinition" module="Products.DCWorkflow.States"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>uploaded</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Uploaded</string> </value> + </item> + <item> + <key> <string>transitions</string> </key> + <value> + <tuple> + <string>convert_action</string> + <string>detect_converted_file</string> + <string>process_file</string> + <string>upload_file</string> + </tuple> + </value> + </item> + <item> + <key> <string>type_list</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions.xml new file mode 100644 index 0000000000..092a5b48f6 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Transitions" module="Products.DCWorkflow.Transitions"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>transitions</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/conversion_failed.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/conversion_failed.xml new file mode 100644 index 0000000000..2d0b88413e --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/conversion_failed.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </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>conversion_failed</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>conversion_failed</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_action.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_action.xml new file mode 100644 index 0000000000..6d00556407 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_action.xml @@ -0,0 +1,103 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>Convert to OpenDocument</string> </value> + </item> + <item> + <key> <string>actbox_url</string> </key> + <value> <string>%(content_url)s/OOoDocument_convertToBase</string> </value> + </item> + <item> + <key> <string>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Call this action to convert the document to an open document format</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>convert_action</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>converting</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Convert File Action</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>Modify portal content</string> + </tuple> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>object/isSupportBaseDataConversion|nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_file.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_file.xml new file mode 100644 index 0000000000..23ea4adeab --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/convert_file.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This workflow method is called to convert a file to a certain format</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>convert_file</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Convert File</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_converted_file.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_converted_file.xml new file mode 100644 index 0000000000..53d01c64a9 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_converted_file.xml @@ -0,0 +1,95 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>will automatically detected when file is completely converted</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>detect_converted_file</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Detect Converted File</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>python: here.isSupportBaseDataConversion() and here.hasBaseData()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_uploaded_file.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_uploaded_file.xml new file mode 100644 index 0000000000..921dfccb87 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/detect_uploaded_file.xml @@ -0,0 +1,103 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string>Document_convertToBaseFormat</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>detect_uploaded_file</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>uploaded</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Detect Uploaded File</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>Access contents information</string> + </tuple> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>python: getattr(here, \'hasTextContent\', getattr(here, \'hasData\', lambda:False))()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_conversion_failed.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_conversion_failed.xml new file mode 100644 index 0000000000..b48393908f --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_conversion_failed.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </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>process_conversion_failed</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </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> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_file.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_file.xml new file mode 100644 index 0000000000..6b2983c5c5 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/process_file.xml @@ -0,0 +1,95 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This workflow method is called whenever conversion has failed</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>process_file</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>converting</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Process File</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>object/isSupportBaseDataConversion|nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/update_file_metadata.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/update_file_metadata.xml new file mode 100644 index 0000000000..ab3921b277 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/update_file_metadata.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This method is invoked each time a file metadata is changed.</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>update_file_metadata</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Update File Metadata</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/upload_file.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/upload_file.xml new file mode 100644 index 0000000000..db063afabf --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/transitions/upload_file.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <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>after_script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>This method is invoked each time a file is uploaded</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>upload_file</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string>uploaded</string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Upload File</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables.xml new file mode 100644 index 0000000000..a067e6fbbe --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Variables" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>variables</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/action.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/action.xml new file mode 100644 index 0000000000..df6c2ee67f --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/action.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>The last transition</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>action</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>transition/getId|nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/actor.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/actor.xml new file mode 100644 index 0000000000..f65890149e --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/actor.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>The name of the user who performed the last transition</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>actor</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>user/getUserName</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/comment.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/comment.xml new file mode 100644 index 0000000000..5774567823 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/comment.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Comments about the last transition</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>comment</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/error_message.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/error_message.xml new file mode 100644 index 0000000000..ca8bd983f6 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/error_message.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Error message if validation failed</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>error_message</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/history.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/history.xml new file mode 100644 index 0000000000..ac03af9143 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/history.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Provides access to workflow history</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>history</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>state_change/getHistory</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/portal_type.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/portal_type.xml new file mode 100644 index 0000000000..d1c833ff18 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/portal_type.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>portal type (use as filter for worklists)</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>portal_type</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/serial.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/serial.xml new file mode 100644 index 0000000000..5379e57a32 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/serial.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>serial</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>state_change/object/getHistorySerial | nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/time.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/time.xml new file mode 100644 index 0000000000..fa51ccb81b --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/variables/time.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_expr</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Time of the last transition</string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>time</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>state_change/getDateTime</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/worklists.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/worklists.xml new file mode 100644 index 0000000000..1f8b17b012 --- /dev/null +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/processing_status_workflow/worklists.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Worklists" module="Products.DCWorkflow.Worklists"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>worklists</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_base/bt/change_log b/bt5/erp5_base/bt/change_log index 4454fc9441..2ed5cacde5 100644 --- a/bt5/erp5_base/bt/change_log +++ b/bt5/erp5_base/bt/change_log @@ -1,3 +1,9 @@ +2010-05-12 nicolas +* add document_conversion_interaction_workflow +* add document_security_interaction_workflow +* move process_status_workflow from erp5_dms +because Notification Message need it. + 2010-04-29 kazuhiko * Remove specialise base category because it already exists in erp5_core. diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 18af9bab1a..ddc27b0c1a 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -731 \ No newline at end of file +739 \ No newline at end of file diff --git a/bt5/erp5_base/bt/template_base_category_list b/bt5/erp5_base/bt/template_base_category_list index a532cc9492..98bc31dd6d 100644 --- a/bt5/erp5_base/bt/template_base_category_list +++ b/bt5/erp5_base/bt/template_base_category_list @@ -2,6 +2,7 @@ agent agent_privilege bank_account_type collect_order_group +contributor currency_exchange_type delivery_builder destination_carrier diff --git a/bt5/erp5_base/bt/template_portal_type_workflow_chain_list b/bt5/erp5_base/bt/template_portal_type_workflow_chain_list index 542fa471a8..cc1592ba5b 100644 --- a/bt5/erp5_base/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_base/bt/template_portal_type_workflow_chain_list @@ -16,14 +16,18 @@ Currency | edit_workflow Currency | validation_workflow Email | edit_workflow Fax | edit_workflow -File | cached_convertible_interaction_workflow +File | document_conversion_interaction_workflow +File | document_security_interaction_workflow File | edit_workflow -Image | cached_convertible_interaction_workflow +Image | document_conversion_interaction_workflow +Image | document_security_interaction_workflow Image | edit_workflow Link | edit_workflow -Notification Message | cached_convertible_interaction_workflow +Notification Message | document_conversion_interaction_workflow +Notification Message | document_security_interaction_workflow Notification Message | edit_workflow Notification Message | notification_message_workflow +Notification Message | processing_status_workflow Organisation | edit_workflow Organisation | validation_workflow Person | edit_workflow diff --git a/bt5/erp5_base/bt/template_workflow_id_list b/bt5/erp5_base/bt/template_workflow_id_list index 3eb34fa2d0..08f7a84d9c 100644 --- a/bt5/erp5_base/bt/template_workflow_id_list +++ b/bt5/erp5_base/bt/template_workflow_id_list @@ -1,5 +1,4 @@ assignment_workflow -cached_convertible_interaction_workflow career_workflow currency_exchange_line_interaction_workflow delivery_causality_interaction_workflow @@ -7,11 +6,14 @@ delivery_causality_workflow delivery_movement_causality_interaction_workflow delivery_movement_simulation_interaction_workflow delivery_simulation_interaction_workflow +document_conversion_interaction_workflow +document_security_interaction_workflow local_permission_interaction_workflow notification_message_workflow order_movement_simulation_interaction_workflow order_simulation_interaction_workflow person_interaction_workflow +processing_status_workflow query_workflow simulation_movement_causality_interaction_workflow user_account_workflow \ No newline at end of file -- 2.30.9