[Erp5-report] r34060 luke - in /erp5/trunk/bt5/erp5_trade: WorkflowTemplateItem/portal_work...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 24 16:33:55 CET 2010


Author: luke
Date: Wed Mar 24 16:33:48 2010
New Revision: 34060

URL: http://svn.erp5.org?rev=34060&view=rev
Log:
 - add draft initial state
Thanks to this container state on freshly initialised packing list is draft.
 - convert miss and pack transition from automatic transition to workflow
   methods
 - add PackingList_calculatePacking which moves packing state to missing or
   packed using workflow method
Thanks to not using automatic transition, but workflow methods and after method
in calculate_packing it is easier to reuse such workflow in highly restricted
environments.

Added:
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/scripts/PackingList_calculatePacking.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/states/draft.xml
Modified:
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/calculate_packing.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/miss.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/pack.xml
    erp5/trunk/bt5/erp5_trade/bt/revision

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow.xml?rev=34060&r1=34059&r2=34060&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -37,7 +37,7 @@
         </item>
         <item>
             <key> <string>initial_state</string> </key>
-            <value> <string>packed</string> </value>
+            <value> <string>draft</string> </value>
         </item>
         <item>
             <key> <string>manager_bypass</string> </key>

Added: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/scripts/PackingList_calculatePacking.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/scripts/PackingList_calculatePacking.xml?rev=34060&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/scripts/PackingList_calculatePacking.xml (added)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/scripts/PackingList_calculatePacking.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -1,0 +1,129 @@
+<?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>packing_list = state_change[\'object\']\n
+if packing_list.isPacked():\n
+  packing_list.pack()\n
+else:\n
+  packing_list.miss()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>state_change, **kw</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>kw</string>
+                            <string>_getitem_</string>
+                            <string>packing_list</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>PackingList_calculatePacking</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/states/draft.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/states/draft.xml?rev=34060&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/states/draft.xml (added)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/states/draft.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -1,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></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>draft</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Draft</string> </value>
+        </item>
+        <item>
+            <key> <string>transitions</string> </key>
+            <value>
+              <tuple>
+                <string>calculate_packing</string>
+                <string>miss</string>
+                <string>pack</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>type_list</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/calculate_packing.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/calculate_packing.xml?rev=34060&r1=34059&r2=34060&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/calculate_packing.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/calculate_packing.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -23,7 +23,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string></string> </value>
+            <value> <string>PackingList_calculatePacking</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/miss.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/miss.xml?rev=34060&r1=34059&r2=34060&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/miss.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/miss.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -32,7 +32,7 @@
         <item>
             <key> <string>guard</string> </key>
             <value>
-              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+              <none/>
             </value>
         </item>
         <item>
@@ -53,47 +53,7 @@
         </item>
         <item>
             <key> <string>trigger_type</string> </key>
-            <value> <int>0</int> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Guard</string>
-          <string>Guard</string>
-        </tuple>
-        <none/>
-      </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>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>text</string> </key>
-            <value> <string>python: not(here.isPacked())</string> </value>
+            <value> <int>2</int> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/pack.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/pack.xml?rev=34060&r1=34059&r2=34060&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/pack.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_container_workflow/transitions/pack.xml [utf8] Wed Mar 24 16:33:48 2010
@@ -32,7 +32,7 @@
         <item>
             <key> <string>guard</string> </key>
             <value>
-              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+              <none/>
             </value>
         </item>
         <item>
@@ -53,47 +53,7 @@
         </item>
         <item>
             <key> <string>trigger_type</string> </key>
-            <value> <int>0</int> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Guard</string>
-          <string>Guard</string>
-        </tuple>
-        <none/>
-      </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>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>text</string> </key>
-            <value> <string>here/isPacked</string> </value>
+            <value> <int>2</int> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_trade/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/bt/revision?rev=34060&r1=34059&r2=34060&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_trade/bt/revision [utf8] Wed Mar 24 16:33:48 2010
@@ -1,1 +1,1 @@
-883
+884




More information about the Erp5-report mailing list