From 967024b2a6fe77ed28d5f58e450bb1150d620241 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 4 Jun 2007 13:52:49 +0000
Subject: [PATCH] Support new object deletion protocol in assignment_workflow

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14679 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_workflow/assignment_workflow.xml   |  1 +
 .../assignment_workflow/states/cancelled.xml  |  8 ++
 .../assignment_workflow/states/deleted.xml    | 94 +++++++++++++++++++
 .../assignment_workflow/states/draft.xml      |  7 ++
 .../transitions/delete_action.xml             | 76 +++++++++++++++
 bt5/erp5_base/bt/revision                     |  2 +-
 6 files changed, 187 insertions(+), 1 deletion(-)
 create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/deleted.xml
 create mode 100644 bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/delete_action.xml

diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow.xml
index 7d150a0766..23f8286ac5 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow.xml
@@ -63,6 +63,7 @@
             <value>
               <tuple>
                 <string>Modify portal content</string>
+                <string>View</string>
               </tuple>
             </value>
         </item>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/cancelled.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/cancelled.xml
index 3676c5ded1..e06d905c91 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/cancelled.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/cancelled.xml
@@ -38,6 +38,14 @@
         </item>
         <item>
             <key> <string>transitions</string> </key>
+            <value>
+              <tuple>
+                <string>delete_action</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>type_list</string> </key>
             <value>
               <tuple/>
             </value>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/deleted.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/deleted.xml
new file mode 100644
index 0000000000..4ce863e071
--- /dev/null
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/deleted.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.DCWorkflow.States</string>
+          <string>StateDefinition</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>deleted</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>Deleted</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>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>Modify portal content</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>View</string> </key>
+                    <value>
+                      <tuple/>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/draft.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/draft.xml
index d6f921eda8..781adaedc8 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/draft.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/draft.xml
@@ -42,11 +42,18 @@
               <tuple>
                 <string>cancel</string>
                 <string>cancel_action</string>
+                <string>delete_action</string>
                 <string>open</string>
                 <string>open_action</string>
               </tuple>
             </value>
         </item>
+        <item>
+            <key> <string>type_list</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/delete_action.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/delete_action.xml
new file mode 100644
index 0000000000..020f514ba3
--- /dev/null
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/delete_action.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.DCWorkflow.Transitions</string>
+          <string>TransitionDefinition</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>actbox_category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_name</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_url</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>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>delete_action</string> </value>
+        </item>
+        <item>
+            <key> <string>new_state_id</string> </key>
+            <value> <string>deleted</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>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index 8d9f781b52..176fdebf1b 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-118
\ No newline at end of file
+119
\ No newline at end of file
-- 
2.30.9