Commit affb6a8d authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

erp5_workflow: a chains_by_type repair script to reset chains_by_type massively.

parent b1ed4aee
<?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># rapair _chains_by_type\n
# repair before delect erp5 workflow and restart the instance!\n
type_workflow_dict = {\'Category\': (\'edit_workflow\',), \'Dynamic Category Property\': (\'dynamic_class_generation_interaction_workflow\',), \'System Preference\': (\'edit_workflow\', \'preference_workflow\'), \'Bug Line\': (\'edit_workflow\', \'bug_event_workflow\'), \'Embedded Folder\': (\'edit_workflow\', \'embedded_workflow\'), \'Test Component\': (\'edit_workflow\', \'dynamic_class_generation_interaction_workflow\', \'component_validation_workflow\'), \'Base Category\': (\'edit_workflow\', \'dynamic_class_generation_interaction_workflow\'), \'Organisation\': (\'validation_workflow\', \'edit_workflow\'), \'Property Type Validity Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Property Existence Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Action Information\': (\'base_type_interaction_workflow\',), \'ERP5Workflow Test Document\': (\'testing_workflow\', \'testing_interaction_workflow\', \'edit_workflow\'), \'Document\': (\'edit_workflow\',), \'Email\': (\'edit_workflow\',), \'Career\': (\'career_workflow\',), \'Document Component\': (\'edit_workflow\', \'dynamic_class_generation_interaction_workflow\', \'component_validation_workflow\'), \'Category Acquired Membership State Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Predicate\': (\'rule_interaction_workflow\', \'edit_workflow\'), \'Category Tool\': (\'dynamic_class_generation_interaction_workflow\',), \'Attribute Unicity Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Role Definition\': (\'edit_workflow\', \'local_permission_interaction_workflow\'), \'Category Membership State Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Assignment\': (\'edit_workflow\', \'assignment_workflow\'), \'Distributed Ram Cache\': (\'distributed_ram_cache_interaction_workflow\',), \'Rounding Model\': (\'validation_workflow\',), \'Component\': (\'validation_workflow\', \'edit_workflow\'), \'Configuration Save\': (\'edit_workflow\',), \'Link\': (\'edit_workflow\',), \'Preference\': (\'edit_workflow\', \'preference_workflow\'), \'Address\': (\'edit_workflow\',), \'TALES Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Category Property\': (\'dynamic_class_generation_interaction_workflow\',), \'Category Related Membership Arity Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Content Existence Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Notification Message\': (\'document_security_interaction_workflow\', \'notification_message_workflow\', \'processing_status_workflow\', \'document_conversion_interaction_workflow\', \'edit_workflow\'), \'Acquired Property\': (\'dynamic_class_generation_interaction_workflow\',), \'Property Sheet\': (\'dynamic_class_generation_interaction_workflow\',), \'Embedded File\': (\'edit_workflow\', \'embedded_workflow\', \'document_conversion_interaction_workflow\'), \'Category Membership Arity Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Category Related Membership State Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Alarm\': (\'edit_workflow\',), \'Bank Account\': (\'validation_workflow\', \'edit_workflow\'), \'Fax\': (\'edit_workflow\',), \'Mapped Value\': (\'edit_workflow\',), \'Business Template\': (\'business_template_building_workflow\', \'business_template_installation_workflow\'), \'Memcached Plugin\': (\'memcached_plugin_interaction_workflow\',), \'Attribute Blacklisted Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Category Existence Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Query\': (\'edit_workflow\', \'query_workflow\'), \'Attribute Equality Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Simulation Movement\': (\'simulation_movement_causality_interaction_workflow\',), \'Person\': (\'validation_workflow\', \'edit_workflow\', \'person_interaction_workflow\', \'user_account_workflow\'), \'File\': (\'document_security_interaction_workflow\', \'document_conversion_interaction_workflow\', \'edit_workflow\'), \'ERP5Workflow Test Object\': (\'dc_test_workflow\',), \'Glossary Term\': (\'validation_workflow\', \'edit_workflow\'), \'Telephone\': (\'edit_workflow\',), \'Agent\': (\'edit_workflow\',), \'Bug\': (\'edit_workflow\', \'bug_workflow\'), \'String Attribute Match Constraint\': (\'dynamic_class_generation_interaction_workflow\',), \'Currency\': (\'validation_workflow\', \'edit_workflow\'), \'Base Type\': (\'dynamic_class_generation_interaction_workflow\', \'base_type_interaction_workflow\'), \'Extension Component\': (\'edit_workflow\', \'dynamic_class_generation_interaction_workflow\', \'component_validation_workflow\'), \'Chat Address\': (\'edit_workflow\',), \'Credit Card\': (\'validation_workflow\', \'edit_workflow\'), \'Currency Exchange Line\': (\'currency_exchange_line_interaction_workflow\', \'edit_workflow\', \'validation_workflow\'), \'Business Configuration\': (\'validation_workflow\', \'edit_workflow\', \'business_configuration_simulation_workflow\'), \'Standard Property\': (\'dynamic_class_generation_interaction_workflow\',), \'Image\': (\'document_security_interaction_workflow\', \'document_conversion_interaction_workflow\', \'edit_workflow\'), \'Property Sheet Tool\': (\'dynamic_class_generation_interaction_workflow\',)} \n
chains_by_type = context.getChainsByType()\n
\n
# the workflow_id to repair\n
workflow_id_to_repair_list = [\'edit_workflow\', \'validation_workflow\']\n
\n
# repair process\n
for workflow_id in workflow_id_to_repair_list:\n
for type_id in chains_by_type:\n
if workflow_id in type_workflow_dict[type_id] and workflow_id not in chains_by_type[type_id]:\n
context.addTypeCBT(type_id, workflow_id)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>chains_by_type_repair_script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Chain By Type Repair Tool</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment