Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
preetwinder
erp5
Commits
5f396e61
Commit
5f396e61
authored
11 years ago
by
Aurel
Browse files
Options
Download
Email Patches
Plain Diff
improve notification message workflow by adding archived & invalidated state + worklist
parent
f5176e2b
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
413 additions
and
15 deletions
+413
-15
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/scripts.xml
...portal_workflow/notification_message_workflow/scripts.xml
+6
-0
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/scripts/DCWorkflow_validate.xml
...fication_message_workflow/scripts/DCWorkflow_validate.xml
+83
-0
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/archived.xml
...orkflow/notification_message_workflow/states/archived.xml
+100
-0
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/deleted.xml
...workflow/notification_message_workflow/states/deleted.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/draft.xml
...l_workflow/notification_message_workflow/states/draft.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/invalidated.xml
...flow/notification_message_workflow/states/invalidated.xml
+100
-0
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/submitted.xml
...rkflow/notification_message_workflow/states/submitted.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/validated.xml
...rkflow/notification_message_workflow/states/validated.xml
+5
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/archive.xml
...low/notification_message_workflow/transitions/archive.xml
+62
-0
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/delete_action.xml
...tification_message_workflow/transitions/delete_action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/invalidate.xml
.../notification_message_workflow/transitions/invalidate.xml
+5
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/invalidate_action.xml
...cation_message_workflow/transitions/invalidate_action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/reject_action.xml
...tification_message_workflow/transitions/reject_action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/submit_action.xml
...tification_message_workflow/transitions/submit_action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/validate_action.xml
...fication_message_workflow/transitions/validate_action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/action.xml
...rkflow/notification_message_workflow/variables/action.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/actor.xml
...orkflow/notification_message_workflow/variables/actor.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/comment.xml
...kflow/notification_message_workflow/variables/comment.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/history.xml
...kflow/notification_message_workflow/variables/history.xml
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/time.xml
...workflow/notification_message_workflow/variables/time.xml
+4
-1
No files found.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/scripts.xml
View file @
5f396e61
...
...
@@ -12,6 +12,12 @@
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
scripts
</string>
</value>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/scripts/DCWorkflow_validate.xml
0 → 100644
View file @
5f396e61
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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
This script is invoked each time a new message is validated\n
The previous version is archived automatically.\n
"""\n
document = state_change[\'object\']\n
reference = document.getReference()\n
if not reference:\n
# If this object has no reference, we can not do anything\n
return\n
portal = document.getPortalObject()\n
portal_catalog = portal.portal_catalog\n
search_kw = dict(reference=reference,\n
validation_state="validated",\n
uid=\'NOT %s\' %document.getUid())\n
for old_document in portal_catalog(**search_kw):\n
old_document = old_document.getObject()\n
old_document.archive()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
DCWorkflow_validate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/archived.xml
0 → 100644
View file @
5f396e61
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"StateDefinition"
module=
"Products.DCWorkflow.States"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
archived
</string>
</value>
</item>
<item>
<key>
<string>
permission_roles
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Archived
</string>
</value>
</item>
<item>
<key>
<string>
transitions
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
Access contents information
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
Add portal content
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
Delete objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
Modify portal content
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
View
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/deleted.xml
View file @
5f396e61
...
...
@@ -41,7 +41,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/draft.xml
View file @
5f396e61
...
...
@@ -48,7 +48,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/invalidated.xml
0 → 100644
View file @
5f396e61
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"StateDefinition"
module=
"Products.DCWorkflow.States"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
invalidated
</string>
</value>
</item>
<item>
<key>
<string>
permission_roles
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Invalidated
</string>
</value>
</item>
<item>
<key>
<string>
transitions
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
Access contents information
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
Add portal content
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
Delete objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
Modify portal content
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
View
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/submitted.xml
View file @
5f396e61
...
...
@@ -46,7 +46,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/states/validated.xml
View file @
5f396e61
...
...
@@ -28,6 +28,7 @@
<key>
<string>
transitions
</string>
</key>
<value>
<tuple>
<string>
archive
</string>
<string>
invalidate
</string>
<string>
invalidate_action
</string>
</tuple>
...
...
@@ -44,7 +45,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/archive.xml
0 → 100644
View file @
5f396e61
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"TransitionDefinition"
module=
"Products.DCWorkflow.Transitions"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_icon
</string>
</key>
<value>
<string></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>
archive
</string>
</value>
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<value>
<string>
archived
</string>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Archive Message
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/delete_action.xml
View file @
5f396e61
...
...
@@ -57,7 +57,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/invalidate.xml
View file @
5f396e61
...
...
@@ -10,6 +10,10 @@
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -38,7 +42,7 @@
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<value>
<string>
draft
</string>
</value>
<value>
<string>
invalidated
</string>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/invalidate_action.xml
View file @
5f396e61
...
...
@@ -57,7 +57,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/reject_action.xml
View file @
5f396e61
...
...
@@ -57,7 +57,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/submit_action.xml
View file @
5f396e61
...
...
@@ -57,7 +57,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/transitions/validate_action.xml
View file @
5f396e61
...
...
@@ -57,7 +57,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/action.xml
View file @
5f396e61
...
...
@@ -47,7 +47,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/actor.xml
View file @
5f396e61
...
...
@@ -47,7 +47,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/comment.xml
View file @
5f396e61
...
...
@@ -47,7 +47,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/history.xml
View file @
5f396e61
...
...
@@ -47,7 +47,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/notification_message_workflow/variables/time.xml
View file @
5f396e61
...
...
@@ -47,7 +47,10 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment