[Erp5-report] r36654 kazuhiko - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 28 21:43:38 CEST 2010
Author: kazuhiko
Date: Mon Jun 28 21:43:37 2010
New Revision: 36654
URL: http://svn.erp5.org?rev=36654&view=rev
Log:
* Add automatic divergence solving function in delivery_causality_workflow.
Added:
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_solveDivergenceAutomatically.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Workflow_solveDivergenceAutomatically.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/transitions/solve_automatically.xml
Modified:
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/building.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/calculating.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/diverged.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/solved.xml
erp5/trunk/bt5/erp5_base/bt/change_log
erp5/trunk/bt5/erp5_base/bt/revision
Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_solveDivergenceAutomatically.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_solveDivergenceAutomatically.xml?rev=36654&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_solveDivergenceAutomatically.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_solveDivergenceAutomatically.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -0,0 +1,178 @@
+<?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[
+
+delivery = context\n
+\n
+portal = delivery.getPortalObject()\n
+solver_tool = portal.portal_solvers\n
+solver_process_tool = portal.portal_solver_processes\n
+\n
+solver_movement_list = []\n
+for tester, simulation_movement in delivery.getDivergentTesterAndSimulationMovementList():\n
+ solver_list = filter(lambda x:x.isAutomaticSolver(),\n
+ solver_tool.searchTargetSolverList(tester, simulation_movement, automatic_solver_only=True))\n
+ if len(solver_list) == 1:\n
+ solver_movement_list.append((solver_list[0], simulation_movement))\n
+\n
+if len(solver_movement_list) > 0:\n
+ # XXX We sometimes want to store solver process document persistently.\n
+ solver_process = solver_process_tool.newContent(\n
+ portal_type=\'Solver Process\', temp_object=True)\n
+ for solver, simulation_movement in solver_movement_list:\n
+ # XXX Do we need grouping here?\n
+ # XXX Do we need to split activities for each target solver?\n
+ # XXX We need to calculate and pass default values for some solvers\n
+ target_solver = solver_process.newContent(\n
+ portal_type=solver.getId(),\n
+ delivery=simulation_movement.getRelativeUrl()\n
+ )\n
+ solver_process.solve()\n
+\n
+delivery.updateCausalityState(solve_automatically=False)\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></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>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>context</string>
+ <string>delivery</string>
+ <string>_getattr_</string>
+ <string>portal</string>
+ <string>solver_tool</string>
+ <string>solver_process_tool</string>
+ <string>solver_movement_list</string>
+ <string>_getiter_</string>
+ <string>tester</string>
+ <string>simulation_movement</string>
+ <string>filter</string>
+ <string>True</string>
+ <string>solver_list</string>
+ <string>len</string>
+ <string>_getitem_</string>
+ <string>solver_process</string>
+ <string>solver</string>
+ <string>target_solver</string>
+ <string>False</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>Delivery_solveDivergenceAutomatically</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Workflow_solveDivergenceAutomatically.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Workflow_solveDivergenceAutomatically.xml?rev=36654&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Workflow_solveDivergenceAutomatically.xml (added)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Workflow_solveDivergenceAutomatically.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -0,0 +1,149 @@
+<?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>delivery = state_change[\'object\']\n
+\n
+portal = delivery.getPortalObject()\n
+solver_tool = getattr(portal, \'portal_solvers\', None)\n
+solver_process_tool = getattr(portal, \'portal_solver_processes\', None)\n
+\n
+if solver_tool is None or solver_process_tool is None:\n
+ delivery.diverge()\n
+ return\n
+else:\n
+ activate_kw = state_change[\'kwargs\'].get(\'activate_kw\') or {}\n
+ delivery.activate(**activate_kw).Delivery_solveDivergenceAutomatically()\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/>
+ </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>state_change</string>
+ <string>delivery</string>
+ <string>getattr</string>
+ <string>_getattr_</string>
+ <string>None</string>
+ <string>portal</string>
+ <string>solver_tool</string>
+ <string>solver_process_tool</string>
+ <string>activate_kw</string>
+ <string>False</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>Workflow_solveDivergenceAutomatically</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/building.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/building.xml?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/building.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/building.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -33,6 +33,7 @@
<tuple>
<string>converge</string>
<string>diverge</string>
+ <string>solve_automatically</string>
<string>start_building</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/calculating.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/calculating.xml?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/calculating.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/calculating.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -33,6 +33,7 @@
<tuple>
<string>converge</string>
<string>diverge</string>
+ <string>solve_automatically</string>
<string>solve_divergence</string>
<string>start_building</string>
</tuple>
Modified: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/diverged.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/diverged.xml?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/diverged.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/diverged.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -34,6 +34,7 @@
<string>calculate</string>
<string>converge</string>
<string>diverge</string>
+ <string>solve_automatically</string>
<string>solve_divergence</string>
<string>solve_divergence_action</string>
<string>split_and_defer</string>
Modified: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/solved.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/solved.xml?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/solved.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/states/solved.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -34,6 +34,7 @@
<string>calculate</string>
<string>converge</string>
<string>diverge</string>
+ <string>solve_automatically</string>
<string>start_building</string>
</tuple>
</value>
Added: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/transitions/solve_automatically.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/transitions/solve_automatically.xml?rev=36654&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/transitions/solve_automatically.xml (added)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/transitions/solve_automatically.xml [utf8] Mon Jun 28 21:43:37 2010
@@ -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>Workflow_solveDivergenceAutomatically</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>solve_automatically</string> </value>
+ </item>
+ <item>
+ <key> <string>new_state_id</string> </key>
+ <value> <string>solving</string> </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Solve Automatically</string> </value>
+ </item>
+ <item>
+ <key> <string>trigger_type</string> </key>
+ <value> <int>2</int> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_base/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/change_log?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/bt/change_log [utf8] Mon Jun 28 21:43:37 2010
@@ -1,3 +1,6 @@
+2010-06-28 kazuhiko
+* Add automatic divergence solving function in delivery_causality_workflow.
+
2010-06-04 kazuhiko
* Do not invoke simulation_movement_causality_interaction_workflow/interactions/calculate_causality for temporary documents.
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=36654&r1=36653&r2=36654&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision [utf8] Mon Jun 28 21:43:37 2010
@@ -1 +1 @@
-776
\ No newline at end of file
+777
\ No newline at end of file
More information about the Erp5-report
mailing list