Commit 5aa717e5 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5Workflow: Rename Portal Types.

parent 01b1f24c
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Transition_viewConfigurator</string> </value>
<value> <string>string:${object_url}/WorkflowTransition_viewConfigurator</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -42,7 +42,7 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
portal_type='Business Configuration'):
business_configuration.setCurrentStateValue(state)
elif subobject.getPortalType() == 'Transition':
elif subobject.getPortalType() == 'Workflow Transition':
# XXX_1: Workflows only call Workflow Script and do not call Python Script in
# portal_skins but Configurator Workflows do. For now leave them as they
# ({before,after}_script_id property) but they should be migrated later on.
......@@ -63,7 +63,7 @@ def migrateToERP5Workflow(portal_workflow, configurator_workflow):
# after_script_value = addWorkflowScript('after_script_id')
transition = workflow.newContent(
portal_type='Transition',
portal_type='Workflow Transition',
reference=reference,
title=title,
destination_list=getCategoryList('state_', subobject.getDestinationValueList()),
......
<property_sheet_list>
<portal_type id="Transition">
<portal_type id="Workflow Transition">
<item>ConfiguratorWorkflowTransition</item>
</portal_type>
<portal_type id="Workflow">
......
......@@ -112,7 +112,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition_viewConfigurator</string> </value>
<value> <string>WorkflowTransition_viewConfigurator</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -120,7 +120,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Transition_viewConfigurator</string> </value>
<value> <string>WorkflowTransition_viewConfigurator</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......
......@@ -27,7 +27,7 @@ Site Property Configurator Item | view
Solver Configurator Item | view
Standard BT5 Configurator Item | view
System Preference Configurator Item | view
Transition | configurator_settings
Workflow | configurator_settings
Workflow | launch_configuration
Workflow Transition | configurator_settings
portal_actions | use_configurator
\ No newline at end of file
Transition | ConfiguratorWorkflowTransition
Workflow | ConfiguratorWorkflow
Workflow | DefaultImage
Workflow Transition | ConfiguratorWorkflowTransition
\ No newline at end of file
......@@ -53,7 +53,7 @@ for message, path in context.Base_findMessageListFromPythonInProduct(FUNC_NAME_L
# Collect workflow transition documents from workflow module.
for document in context.portal_workflow.express_setup_workflow.contentValues():
if document.portal_type=='Transition' and document.getTransitionFormId() is not None:
if document.portal_type=='Workflow Transition' and document.getTransitionFormId() is not None:
add_message(document.getTitle(), portal_url.getRelativeContentURL(document))
......
......@@ -59,13 +59,13 @@ class TestERP5Workflow(ERP5TypeTestCase):
workflow.setReference('wf')
# state variable
workflow.setStateVariable('current_state')
state1 = workflow.newContent(portal_type='State',
state1 = workflow.newContent(portal_type='Workflow State',
title='State 1')
state2 = workflow.newContent(portal_type='State',
state2 = workflow.newContent(portal_type='Workflow State',
title='State 2')
state1.setReference('state1')
state2.setReference('state2')
transition1 = workflow.newContent(portal_type='Transition',
transition1 = workflow.newContent(portal_type='Workflow Transition',
title='Transition 1')
transition1.setReference('transition1')
state1.setDestinationValue(transition1)
......@@ -86,14 +86,14 @@ class TestERP5Workflow(ERP5TypeTestCase):
workflow = self.workflow_module.newContent(portal_type='Workflow')
workflow.setReference('wf')
workflow.setStateVariable('current_state')
state1 = workflow.newContent(portal_type='State',
state1 = workflow.newContent(portal_type='Workflow State',
title='State 1')
state1.setReference('state1')
workflow.setSourceValue(state1)
transition1 = workflow.newContent(portal_type='Transition',
transition1 = workflow.newContent(portal_type='Workflow Transition',
title='Transition 1')
transition1.setReference('transition1')
transition2 = workflow.newContent(portal_type='Transition',
transition2 = workflow.newContent(portal_type='Workflow Transition',
title='Transition 2',
guard_expression='python: False')
transition2.setReference('transition2')
......@@ -109,11 +109,11 @@ class TestERP5Workflow(ERP5TypeTestCase):
portal_type='Workflow')
workflow.setReference('wf')
workflow.setStateVariable('current_state')
state1 = workflow.newContent(portal_type='State',
state1 = workflow.newContent(portal_type='Workflow State',
title='State 1')
state1.setReference('state1')
workflow.setSourceValue(state1)
transition1 = workflow.newContent(portal_type='Transition',
transition1 = workflow.newContent(portal_type='Workflow Transition',
title='Transition 1',
destination_value=state1)
transition1.setReference('transition1')
......@@ -141,13 +141,13 @@ class TestERP5Workflow(ERP5TypeTestCase):
state_base_category='current_state'
)
workflow.setReference('wf')
state1 = workflow.newContent(portal_type='State',
state1 = workflow.newContent(portal_type='Workflow State',
title='State 1')
state2 = workflow.newContent(portal_type='State',
state2 = workflow.newContent(portal_type='Workflow State',
title='State 2')
state1.setReference('state1')
state2.setReference('state2')
transition1 = workflow.newContent(portal_type='Transition',
transition1 = workflow.newContent(portal_type='Workflow Transition',
title='Transition 1')
transition1.setReference('transition1')
state1.setDestinationValue(transition1)
......@@ -174,11 +174,11 @@ class TestERP5Workflow(ERP5TypeTestCase):
workflow = self.workflow_module.newContent(portal_type='Workflow')
workflow.setReference('wf')
workflow.setStateVariable('current_state')
state1 = workflow.newContent(portal_type='State', title='State 1')
state2 = workflow.newContent(portal_type='State', title='State 2')
state1 = workflow.newContent(portal_type='Workflow State', title='State 1')
state2 = workflow.newContent(portal_type='Workflow State', title='State 2')
state1.setReference('state1')
state2.setReference('state2')
transition1 = workflow.newContent(portal_type='Transition', title='Transition 1')
transition1 = workflow.newContent(portal_type='Workflow Transition', title='Transition 1')
transition1.setReference('transition1')
state1.setDestinationValue(transition1)
transition1.setDestinationValue(state2)
......@@ -198,8 +198,8 @@ class TestERP5Workflow(ERP5TypeTestCase):
# FIXME: not passing parameter to an before script is probably too
# restrictive
def test_TransitionGuards(self, transition_type='Transition'):
workflow_type = 'Workflow' if transition_type == 'Transition' else \
def test_TransitionGuards(self, transition_type='Workflow Transition'):
workflow_type = 'Workflow' if transition_type == 'Workflow Transition' else \
'Interaction Workflow'
workflow = self.workflow_module.newContent(portal_type=workflow_type)
transition = workflow.newContent(portal_type=transition_type)
......@@ -223,15 +223,15 @@ class TestERP5Workflow(ERP5TypeTestCase):
self.assertEqual(transition.getGuardExpressionInstance().text, 'python: "Hello, world"')
def test_InteractionGuards(self):
self.test_TransitionGuards(transition_type='Interaction')
self.test_TransitionGuards(transition_type='Interaction Workflow Interaction')
def test_Base_viewDict(self):
"""
verify that Base_viewDict view can be accessed
"""
workflow = self.workflow_module.newContent(portal_type='Workflow')
state = workflow.newContent(portal_type='State', title='Some State')
transition = workflow.newContent(portal_type='Transition',
state = workflow.newContent(portal_type='Workflow State', title='Some State')
transition = workflow.newContent(portal_type='Workflow Transition',
title='Some Transition')
transition.setReference('change_something')
transition.setGuardRoleList(['Assignee', 'Assignor'])
......
Interaction
Interaction Workflow
State
Transition
Interaction Workflow Interaction
Workflow
Workflow Script
Workflow State
Workflow Test Document
Workflow Test Module
Workflow Tool
Workflow Transition
Workflow Variable
Worklist
\ No newline at end of file
......@@ -251,7 +251,7 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
for tid in interaction_id_list:
tdef = self.interactions[tid]
interaction = SubElement(interactions, 'interaction', attrib=dict(
reference=tdef.getReference(),portal_type='Interaction'))
reference=tdef.getReference(),portal_type='Interaction Workflow Interaction'))
guard = SubElement(interaction, 'guard', attrib=dict(type='object'))
for property_id in sorted(interaction_prop_id_to_show):
# creationg guard
......@@ -358,7 +358,7 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
addWorkflowFactory(InteractionWorkflowDefinition, id='interaction_workflow',
title='Web-configurable interaction workflow')
## Avoid copy/paste from Products.ERP5Type.Core.Interaction
## Avoid copy/paste from Products.ERP5Type.Core.InteractionWorkflowInteraction
from functools import partial as _p
from Products.ERP5Type.Core.InteractionWorkflow import InteractionWorkflow as ERP5InteractionWorkflow
InteractionWorkflowDefinition.security = ClassSecurityInfo()
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Interaction_view</string> </value>
<value> <string>string:${object_url}/InteractionWorkflowInteraction_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/State_viewPermission</string> </value>
<value> <string>string:${object_url}/WorkflowState_viewPermission</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Transition_view</string> </value>
<value> <string>string:${object_url}/WorkflowState_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/TransitionVariable_view</string> </value>
<value> <string>string:${object_url}/WorkflowTransitionVariable_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/State_view</string> </value>
<value> <string>string:${object_url}/WorkflowTransition_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -74,7 +74,7 @@
<item>ZODB Continuous Increasing Id Generator</item>
</portal_type>
<portal_type id="Interaction Workflow">
<item>Interaction</item>
<item>Interaction Workflow Interaction</item>
<item>Workflow Script</item>
<item>Workflow Variable</item>
</portal_type>
......@@ -126,9 +126,6 @@
<portal_type id="Template Tool">
<item>Business Template</item>
</portal_type>
<portal_type id="Transition">
<item>Transition Variable</item>
</portal_type>
<portal_type id="Trash Tool">
<item>Trash Bin</item>
</portal_type>
......@@ -138,9 +135,9 @@
<item>Preference Type</item>
</portal_type>
<portal_type id="Workflow">
<item>State</item>
<item>Transition</item>
<item>Workflow Script</item>
<item>Workflow State</item>
<item>Workflow Transition</item>
<item>Workflow Variable</item>
<item>Worklist</item>
</portal_type>
......@@ -148,4 +145,7 @@
<item>Interaction Workflow</item>
<item>Workflow</item>
</portal_type>
<portal_type id="Workflow Transition">
<item>Workflow Transition Variable</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
......@@ -5,10 +5,10 @@
<portal_type id="Conceptual Id Generator">
<item>specialise</item>
</portal_type>
<portal_type id="Transition Variable">
<portal_type id="Trash Bin">
<item>causality</item>
</portal_type>
<portal_type id="Trash Bin">
<portal_type id="Workflow Transition Variable">
<item>causality</item>
</portal_type>
</base_category_list>
\ No newline at end of file
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Interaction</string> </value>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
......@@ -46,7 +46,7 @@
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Interaction</string> </value>
<value> <string>InteractionWorkflowInteraction</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
......
......@@ -47,11 +47,11 @@
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addState</string> </value>
<value> <string>addWorkflowState</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State</string> </value>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>State</string> </value>
<value> <string>WorkflowState</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addVariable</string> </value>
<value> <string>addWorkflowVariable</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
......@@ -64,7 +64,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition Variable</string> </value>
<value> <string>Workflow Transition Variable</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
......
......@@ -35,7 +35,7 @@
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Transition</string> </value>
<value> <string>ERP5 Workflow Transition</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -44,7 +44,7 @@
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addTransition</string> </value>
<value> <string>addWorkflowTransition</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
......@@ -58,11 +58,11 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition</string> </value>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>Transition_init</string> </value>
<value> <string>WorkflowTransition_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
......@@ -76,7 +76,7 @@
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Transition</string> </value>
<value> <string>WorkflowTransition</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
......
......@@ -108,11 +108,11 @@
<workflow>component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Interaction</type>
<type>Interaction Workflow</type>
<workflow>dynamic_class_generation_interaction_workflow</workflow>
</chain>
<chain>
<type>Interaction Workflow</type>
<type>Interaction Workflow Interaction</type>
<workflow>dynamic_class_generation_interaction_workflow</workflow>
</chain>
<chain>
......@@ -192,11 +192,11 @@
<workflow>component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Transition</type>
<type>Workflow</type>
<workflow>dynamic_class_generation_interaction_workflow</workflow>
</chain>
<chain>
<type>Workflow</type>
<type>Workflow Transition</type>
<workflow>dynamic_class_generation_interaction_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
......@@ -105,7 +105,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Interaction_view</string> </value>
<value> <string>InteractionWorkflowInteraction_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -129,7 +129,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Interaction</string> </value>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -131,8 +131,8 @@
<value>
<list>
<tuple>
<string>Interaction</string>
<string>Interaction</string>
<string>Interaction Workflow Interaction</string>
<string>Interaction Workflow Interaction</string>
</tuple>
</list>
</value>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State_asCellRange</string> </value>
<value> <string>WorkflowState_asCellRange</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State_getPermissionMatrixContext</string> </value>
<value> <string>WorkflowState_getPermissionMatrixContext</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -106,7 +106,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State_view</string> </value>
<value> <string>WorkflowState_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -114,7 +114,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>State_view</string> </value>
<value> <string>WorkflowState_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -130,7 +130,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>State</string> </value>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -91,7 +91,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State_viewPermission</string> </value>
<value> <string>WorkflowState_viewPermission</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>State_viewPermission</string> </value>
<value> <string>WorkflowState_viewPermission</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......
......@@ -213,7 +213,7 @@
</item>
<item>
<key> <string>as_cell_range_script_id</string> </key>
<value> <string>State_asCellRange</string> </value>
<value> <string>WorkflowState_asCellRange</string> </value>
</item>
<item>
<key> <string>cell_base_id</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>getter_method</string> </key>
<value> <string>State_getPermissionMatrixContext</string> </value>
<value> <string>WorkflowState_getPermissionMatrixContext</string> </value>
</item>
<item>
<key> <string>global_attributes</string> </key>
......
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TransitionVariable_view</string> </value>
<value> <string>WorkflowTransitionVariable_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -107,7 +107,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>TransitionVariable_view</string> </value>
<value> <string>WorkflowTransitionVariable_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -123,7 +123,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Transition Variable</string> </value>
<value> <string>Workflow Transition Variable</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition_init</string> </value>
<value> <string>WorkflowTransition_init</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -117,7 +117,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition_view</string> </value>
<value> <string>WorkflowTransition_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Transition_view</string> </value>
<value> <string>WorkflowTransition_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -141,7 +141,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Transition</string> </value>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -87,7 +87,7 @@
<string>Causality</string>
</tuple>
<tuple>
<string>Variable_getNonEvaluatedVariableDefault</string>
<string>WorkflowVariable_getNonEvaluatedVariableDefault</string>
<string>Value</string>
</tuple>
</list>
......@@ -106,8 +106,8 @@
<value>
<list>
<tuple>
<string>Transition Variable</string>
<string>Transition Variable</string>
<string>Workflow Transition Variable</string>
<string>Workflow Transition Variable</string>
</tuple>
</list>
</value>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Variable_getNonEvaluatedVariableDefault</string> </value>
<value> <string>WorkflowVariable_getNonEvaluatedVariableDefault</string> </value>
</item>
</dictionary>
</pickle>
......
"""
Set up an Workflow with defaults variables needed by ERP5
"""
state = context.newContent(portal_type='State', reference='draft', title='Draft')
state = context.newContent(portal_type='Workflow State', reference='draft', title='Draft')
context.setSourceValue(state)
for v, property_dict in (
......
......@@ -130,8 +130,8 @@
<value>
<list>
<tuple>
<string>State</string>
<string>State</string>
<string>Workflow State</string>
<string>Workflow State</string>
</tuple>
</list>
</value>
......
......@@ -135,8 +135,8 @@
<value>
<list>
<tuple>
<string>Transition</string>
<string>Transition</string>
<string>Workflow Transition</string>
<string>Workflow Transition</string>
</tuple>
</list>
</value>
......
......@@ -90,7 +90,7 @@
<string>Title</string>
</tuple>
<tuple>
<string>Variable_getNonEvaluatedVariableDefault</string>
<string>WorkflowVariable_getNonEvaluatedVariableDefault</string>
<string>Default Value</string>
</tuple>
<tuple>
......
......@@ -88,9 +88,9 @@ Extension Component | view
Extension Component | web_view
Folder | view
Id Tool | view
Interaction Workflow Interaction | view
Interaction Workflow | script_view
Interaction Workflow | view
Interaction | view
Interface Component | view
Interface Component | web_view
Memcached Plugin | view
......@@ -137,8 +137,6 @@ SQL Non Continuous Increasing Id Generator | view
Script Constraint | predicate
Script Constraint | view
Standard Property | view
State | permission
State | view
String Attribute Match Constraint | predicate
String Attribute Match Constraint | view
System Preference | captcha
......@@ -160,8 +158,6 @@ Test Component | view
Test Component | web_view
Tool Component | view
Tool Component | web_view
Transition Variable | view
Transition | view
Trash Bin | jump_bt5
Trash Bin | view
Trash Folder | view
......@@ -171,8 +167,12 @@ Workflow Script | proxy_role_view
Workflow Script | proxy_role_view
Workflow Script | view
Workflow Script | view
Workflow State | permission
Workflow State | view
Workflow Tool | conversion
Workflow Tool | view
Workflow Transition Variable | view
Workflow Transition | view
Workflow Variable | view
Workflow | permission_view
Workflow | script_view
......
......@@ -34,7 +34,7 @@ Id Tool | Application Id Generator
Id Tool | Conceptual Id Generator
Id Tool | SQL Non Continuous Increasing Id Generator
Id Tool | ZODB Continuous Increasing Id Generator
Interaction Workflow | Interaction
Interaction Workflow | Interaction Workflow Interaction
Interaction Workflow | Workflow Script
Interaction Workflow | Workflow Variable
Memcached Tool | Memcached Plugin
......@@ -67,15 +67,15 @@ Property Sheet | TALES Constraint
Simulation Movement | Applied Rule
Simulation Tool | Applied Rule
Template Tool | Business Template
Transition | Transition Variable
Trash Tool | Trash Bin
Types Tool | Base Type
Types Tool | Preference Tool Type
Types Tool | Preference Type
Workflow Tool | Interaction Workflow
Workflow Tool | Workflow
Workflow | State
Workflow | Transition
Workflow Transition | Workflow Transition Variable
Workflow | Workflow Script
Workflow | Workflow State
Workflow | Workflow Transition
Workflow | Workflow Variable
Workflow | Worklist
\ No newline at end of file
Application Id Generator | specialise
Conceptual Id Generator | specialise
Transition Variable | causality
Trash Bin | causality
Workflow Transition Variable | causality
\ No newline at end of file
......@@ -49,8 +49,8 @@ Event
Extension Component
Folder
Id Tool
Interaction
Interaction Workflow
Interaction Workflow Interaction
Interface Component
Mapped Value
Memcached Plugin
......@@ -83,7 +83,6 @@ Session Tool
Simulation Movement
Simulation Tool
Standard Property
State
String Attribute Match Constraint
System Preference
TALES Constraint
......@@ -91,8 +90,6 @@ Template Tool
Test Component
Test Tool
Tool Component
Transition
Transition Variable
Trash Bin
Trash Folder
Trash Tool
......@@ -100,7 +97,10 @@ Types Tool
Workflow
Workflow Script
Workflow Script
Workflow State
Workflow Tool
Workflow Transition
Workflow Transition Variable
Workflow Variable
Worklist
ZODB Continuous Increasing Id Generator
\ No newline at end of file
......@@ -32,8 +32,8 @@ Dynamic Category Property | dynamic_class_generation_interaction_workflow
Extension Component | component_validation_workflow
Extension Component | dynamic_class_generation_interaction_workflow
Extension Component | edit_workflow
Interaction Workflow Interaction | dynamic_class_generation_interaction_workflow
Interaction Workflow | dynamic_class_generation_interaction_workflow
Interaction | dynamic_class_generation_interaction_workflow
Interface Component | component_validation_workflow
Interface Component | dynamic_class_generation_interaction_workflow
Interface Component | edit_workflow
......@@ -67,5 +67,5 @@ Test Component | edit_workflow
Tool Component | component_validation_workflow
Tool Component | dynamic_class_generation_interaction_workflow
Tool Component | edit_workflow
Transition | dynamic_class_generation_interaction_workflow
Workflow Transition | dynamic_class_generation_interaction_workflow
Workflow | dynamic_class_generation_interaction_workflow
\ No newline at end of file
......@@ -32,7 +32,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Interaction</string> </value>
<value> <string>InteractionWorkflowInteraction</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>State</string> </value>
<value> <string>WorkflowState</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Transition</string> </value>
<value> <string>WorkflowTransition</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -97,6 +97,7 @@ HtmlStylePreference
IndividualCalendarConstraint
IndustrialDescription
IntegrationModule
InteractionWorkflowInteraction
InternetProtocolAddress
Inventory
InventoryLine
......@@ -154,7 +155,6 @@ SortIndex
SQLIdGenerator
StandardBT5ConfiguratorItem
StandardProperty
State
StockCapacity
SupplyLine
SupplyLink
......@@ -176,7 +176,7 @@ TradeOrderLine
TradePreference
Transformation
TransformedResource
Transition
WorkflowTransition
TranslatableProperty
Url
WorkflowVariable
......@@ -188,8 +188,8 @@ VcsPreference
WebSection
WebSite
Workflow
WorkflowState
XMLObject
AttributeBlacklistedConstraint
CaptchaPreference
GeographicalPoint
\ No newline at end of file
Interaction
\ No newline at end of file
......@@ -507,7 +507,7 @@ from Products.ERP5Type.Accessor import WorkflowHistory as WorkflowHistoryAccesso
def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow):
"""We should now make sure workflow methods are defined
and also make sure simulation state is defined."""
from Products.ERP5Type.Core.Transition import TRIGGER_WORKFLOW_METHOD
from Products.ERP5Type.Core.WorkflowTransition import TRIGGER_WORKFLOW_METHOD
# aq_inner is required to prevent extra name lookups from happening
# infinitely. For instance, if a workflow is missing, and the acquisition
......
......@@ -33,7 +33,7 @@ from AccessControl.SecurityManagement import setSecurityManager
from Acquisition import aq_base
from Products.DCWorkflow.Expression import StateChangeInfo
from Products.ERP5Type import Permissions
from Products.ERP5Type.Core.Transition import TRIGGER_WORKFLOW_METHOD
from Products.ERP5Type.Core.WorkflowTransition import TRIGGER_WORKFLOW_METHOD
from Products.ERP5Type.Core.Workflow import Workflow, createExpressionContext
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
......@@ -167,7 +167,7 @@ class InteractionWorkflow(Workflow):
security.declarePrivate('getTransitionValueList')
def getTransitionValueList(self):
return self.objectValues(portal_type="Interaction")
return self.objectValues(portal_type="Interaction Workflow Interaction")
security.declarePrivate('getTransitionValueByReference')
def getTransitionValueByReference(self, transition_id):
......@@ -175,11 +175,11 @@ class InteractionWorkflow(Workflow):
security.declarePrivate('getTransitionValueList')
def getTransitionValueList(self):
return self.objectValues(portal_type="Interaction")
return self.objectValues(portal_type="Interaction Workflow Interaction")
security.declarePrivate('getTransitionReferenceList')
def getTransitionReferenceList(self):
return [ob.getReference() for ob in self.objectValues(portal_type="Interaction")]
return [ob.getReference() for ob in self.objectValues(portal_type="Interaction Workflow Interaction")]
security.declarePrivate('notifyWorkflowMethod')
def notifyWorkflowMethod(self, ob, transition_list, args=None, kw=None):
......@@ -370,7 +370,7 @@ class InteractionWorkflow(Workflow):
# 1. Interaction as XML
interaction_reference_list = []
interaction_list = self.objectValues(portal_type='Interaction')
interaction_list = self.objectValues(portal_type='Interaction Workflow Interaction')
interaction_prop_id_to_show = sorted(['activate_script_name',
'after_script_name', 'before_commit_script_name', 'description',
'groups', 'roles', 'expr', 'permissions', 'trigger_method_id',
......
......@@ -32,14 +32,14 @@ from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.mixin.guardable import GuardableMixin
class Interaction(IdAsReferenceMixin('interaction_'),
class InteractionWorkflowInteraction(IdAsReferenceMixin('interaction_'),
XMLObject,
GuardableMixin):
"""
An ERP5 Workflow Interaction (Interaction Workflow)
"""
meta_type = 'ERP5 Interaction'
portal_type = 'Interaction'
portal_type = 'Interaction Workflow Interaction'
add_permission = Permissions.AddPortalContent
security = ClassSecurityInfo()
......@@ -52,7 +52,7 @@ class Interaction(IdAsReferenceMixin('interaction_'),
'CategoryCore',
'DublinCore',
'Reference',
'Interaction',
'InteractionWorkflowInteraction',
'Guard',
)
......
......@@ -92,7 +92,7 @@ from Products.ERP5Type.patches.WorkflowTool import (SECURITY_PARAMETER_ID,
WORKLIST_METADATA_KEY)
from Products.ERP5Type.Utils import convertToMixedCase
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Core.Transition import (TRIGGER_AUTOMATIC,
from Products.ERP5Type.Core.WorkflowTransition import (TRIGGER_AUTOMATIC,
TRIGGER_USER_ACTION,
TRIGGER_WORKFLOW_METHOD)
......@@ -645,13 +645,13 @@ class Workflow(XMLObject):
security.declareProtected(Permissions.AccessContentsInformation,
'getStateValueList')
def getStateValueList(self):
return self.objectValues(portal_type="State")
return self.objectValues(portal_type="Workflow State")
security.declareProtected(Permissions.AccessContentsInformation,
'getStateReferenceList')
def getStateReferenceList(self):
return [state.getReference()
for state in self.objectValues(portal_type="State")]
for state in self.objectValues(portal_type="Workflow State")]
security.declareProtected(Permissions.AccessContentsInformation,
'getWorklistValueList')
......@@ -693,13 +693,13 @@ class Workflow(XMLObject):
security.declareProtected(Permissions.AccessContentsInformation,
'getTransitionValueList')
def getTransitionValueList(self):
return self.objectValues(portal_type="Transition")
return self.objectValues(portal_type="Workflow Transition")
security.declareProtected(Permissions.AccessContentsInformation,
'getTransitionReferenceList')
def getTransitionReferenceList(self):
return [transition.getReference() for transition
in self.objectValues(portal_type="Transition")]
in self.objectValues(portal_type="Workflow Transition")]
security.declareProtected(Permissions.AccessContentsInformation,
'getScriptValueList')
......@@ -822,7 +822,7 @@ class Workflow(XMLObject):
if tdef is not None:
transition_expression_dict = {
variable.getCausalityId(): variable.getVariableDefaultExpressionInstance()
for variable in tdef.objectValues(portal_type='Transition Variable')
for variable in tdef.objectValues(portal_type='Workflow Transition Variable')
}
# Update all transition variables
......@@ -1073,7 +1073,7 @@ class Workflow(XMLObject):
property_value = self._getOb(tdef.getAfterScriptIdList()[0]).getReference()
sub_object = SubElement(transition, property_id, attrib=dict(type='string'))
elif property_id =='transition_variable':
tr_var_list = tdef.objectValues(portal_type='Transition Variable')
tr_var_list = tdef.objectValues(portal_type='Workflow Transition Variable')
for tr_var in tr_var_list:
reference = self._getOb(tr_var.getCausalityId()).getReference()
transition_variable = SubElement(transition_variables, property_id, attrib=dict(id=reference,type='variable'))
......
......@@ -33,13 +33,13 @@ from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.ERP5Type.XMLObject import XMLObject
class State(IdAsReferenceMixin("state_"),
class WorkflowState(IdAsReferenceMixin("state_"),
XMLObject):
"""
A ERP5 State.
"""
meta_type = 'ERP5 State'
portal_type = 'State'
meta_type = 'ERP5 Workflow State'
portal_type = 'Workflow State'
add_permission = Permissions.AddPortalContent
state_permission_role_list_dict = None
......@@ -55,7 +55,7 @@ class State(IdAsReferenceMixin("state_"),
'Reference',
'Comment',
'SortIndex',
'State',
'WorkflowState',
)
def addPossibleTransition(self, tr_ref):
......@@ -152,16 +152,16 @@ from Products.ERP5Type import WITH_LEGACY_WORKFLOW
if WITH_LEGACY_WORKFLOW:
from Products.ERP5Type.Utils import deprecated
State.getTransitions = \
WorkflowState.getTransitions = \
deprecated('getTransitions() is deprecated; use getDestinationIdList()')\
(lambda self: self.getDestinationIdList())
State.security.declareProtected(Permissions.AccessContentsInformation, 'getTransitions')
WorkflowState.security.declareProtected(Permissions.AccessContentsInformation, 'getTransitions')
from ComputedAttribute import ComputedAttribute
State.transitions = ComputedAttribute(
WorkflowState.transitions = ComputedAttribute(
deprecated('`transitions` is deprecated; use getDestinationValueList()')\
(State.getDestinationIdList),
(WorkflowState.getDestinationIdList),
1) # must be Acquisition-wrapped
State.security.declareProtected(Permissions.AccessContentsInformation, 'transitions')
WorkflowState.security.declareProtected(Permissions.AccessContentsInformation, 'transitions')
InitializeClass(State)
InitializeClass(WorkflowState)
......@@ -37,14 +37,14 @@ TRIGGER_AUTOMATIC = 0
TRIGGER_USER_ACTION = 1
TRIGGER_WORKFLOW_METHOD = 2
class Transition(IdAsReferenceMixin("transition_"),
class WorkflowTransition(IdAsReferenceMixin("transition_"),
XMLObject,
GuardableMixin):
"""
A ERP5 Transition.
"""
meta_type = 'ERP5 Transition'
portal_type = 'Transition'
meta_type = 'ERP5 Workflow Transition'
portal_type = 'Workflow Transition'
add_permission = Permissions.AddPortalContent
security = ClassSecurityInfo()
......@@ -58,7 +58,7 @@ class Transition(IdAsReferenceMixin("transition_"),
'Reference',
'Comment',
'SortIndex',
'Transition',
'WorkflowTransition',
'Guard',
'ActionInformation',
)
......@@ -155,23 +155,23 @@ class Transition(IdAsReferenceMixin("transition_"),
"""
Return Transition Variables
"""
return self.objectValues(portal_type='Transition Variable')
return self.objectValues(portal_type='Workflow Transition Variable')
from Products.ERP5Type import WITH_LEGACY_WORKFLOW
if WITH_LEGACY_WORKFLOW:
from Products.ERP5Type.Utils import deprecated
from ComputedAttribute import ComputedAttribute
Transition.actbox_url = ComputedAttribute(
WorkflowTransition.actbox_url = ComputedAttribute(
deprecated('`actbox_url` is deprecated; use getAction()')\
(lambda self: self.getAction()))
Transition.security.declareProtected(Permissions.AccessContentsInformation,
WorkflowTransition.security.declareProtected(Permissions.AccessContentsInformation,
'actbox_url')
Transition.actbox_name = ComputedAttribute(
WorkflowTransition.actbox_name = ComputedAttribute(
deprecated('`actbox_name` is deprecated; use getActionName()')\
(lambda self: self.getActionName()))
Transition.security.declareProtected(Permissions.AccessContentsInformation,
WorkflowTransition.security.declareProtected(Permissions.AccessContentsInformation,
'actbox_name')
InitializeClass(Transition)
InitializeClass(WorkflowTransition)
......@@ -67,7 +67,7 @@ class PropertySheetTool(BaseTool):
'template_tool_component_id_property')
def _isBootstrapRequired(self):
if not self.has_key('Interaction'):
if not self.has_key('InteractionWorkflowInteraction'):
return True
bt_has_key = self.BusinessTemplate.has_key
......@@ -90,16 +90,10 @@ class PropertySheetTool(BaseTool):
# for workflows
'Guard',
'WorkflowVariable',
'Interaction',
'InteractionWorkflowInteraction',
'ActionInformation/action_name_property',
'Transition',
'Transition/before_script_category,'
'Transition/after_script_category',
'Transition/trigger_type_property',
'State',
'State/acquire_permission_property',
'State/selected_property',
'State/state_type_property',
'WorkflowState',
'WorkflowTransition',
'Predicate',
'Workflow',
'Workflow/manager_bypass_property',
......
......@@ -105,14 +105,14 @@ class TypesTool(TypeProvider):
'Standard Property',
'Acquired Property',
# workflow (initializePortalTypeDynamicWorkflowMethods)
'State',
'Transition',
'Transition Variable',
'Workflow State',
'Workflow Transition',
'Workflow Transition Variable',
'Workflow Script',
'Workflow Variable',
'Worklist',
'Workflow',
'Interaction',
'Interaction Workflow Interaction',
'Interaction Workflow',
# the following ones are required to upgrade an existing site
'Category Property',
......
......@@ -226,8 +226,11 @@ def generatePortalTypeClass(site, portal_type_name):
# Configurator Workflow implementation (workflow_module) used to have a
# dedicated Portal Type for Transition Variable but this is now the same as
# any other Workflow Variable.
if WITH_LEGACY_WORKFLOW and portal_type_name == 'Transition Variable':
if WITH_LEGACY_WORKFLOW:
if portal_type_name == 'Transition Variable':
type_class = 'WorkflowVariable'
elif portal_type_name in ('State', 'Transition'):
type_class = 'Workflow' + portal_type_name
if type_class is None:
raise AttributeError('Document class is not defined on Portal Type ' + \
......
......@@ -664,7 +664,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
number_of_element=str(len(state_reference_list))))
for sid in state_id_list:
sdef = self.states[sid]
state = SubElement(states, 'state', attrib=dict(reference=sid,portal_type='State'))
state = SubElement(states, 'state', attrib=dict(reference=sid,portal_type='Workflow State'))
for property_id in sorted(state_prop_id_to_show):
property_value = getattr(sdef, property_id, '')
if property_value is None or property_value == [] or property_value ==():
......@@ -689,7 +689,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
for tid in transition_id_list:
tdef = self.transitions[tid]
transition = SubElement(transitions, 'transition',
attrib=dict(reference=tid, portal_type='Transition'))
attrib=dict(reference=tid, portal_type='Workflow Transition'))
guard = SubElement(transition, 'guard', attrib=dict(type='object'))
transition_variables = SubElement(transition, 'transition_variables', attrib=dict(type='object'))
for property_id in sorted(transition_prop_id_to_show):
......@@ -964,7 +964,7 @@ def convertToERP5Workflow(self, temp_object=False):
# create transition (portal_type = Transition)
for tid in dc_workflow_transition_value_list:
tdef = dc_workflow_transition_value_list.get(tid)
transition = workflow.newContent(portal_type='Transition', temp_object=temp_object)
transition = workflow.newContent(portal_type='Workflow Transition', temp_object=temp_object)
if tdef.title == '' or tdef.title is None:
tdef.title = UpperCase(tdef.id)
transition.setTitle(tdef.title)
......@@ -984,7 +984,7 @@ def convertToERP5Workflow(self, temp_object=False):
if tdef.guard.expr is not None:
transition.setGuardExpression(tdef.guard.expr.text)
for transition in workflow.objectValues(portal_type='Transition'):
for transition in workflow.objectValues(portal_type='Workflow Transition'):
# configure after/before scripts
# we have to loop again over transitions because some
# before/after/... scripts are transitions and obviously, all of
......@@ -1002,7 +1002,7 @@ def convertToERP5Workflow(self, temp_object=False):
workflow_managed_role_list = workflow.getManagedRoleList()
for sid in self.states:
sdef = self.states.get(sid)
state = workflow.newContent(portal_type='State', temp_object=temp_object)
state = workflow.newContent(portal_type='Workflow State', temp_object=temp_object)
if sdef.title == '' or sdef.title is None:
sdef.title = UpperCase(sdef.id)
if hasattr(sdef, 'type_list'):
......@@ -1070,7 +1070,7 @@ def convertToERP5Workflow(self, temp_object=False):
dc_workflow_interaction_value_dict = self.interactions
# create interactions (portal_type = Interaction)
for tid in dc_workflow_interaction_value_dict:
interaction = workflow.newContent(portal_type='Interaction', temp_object=temp_object)
interaction = workflow.newContent(portal_type='Interaction Workflow Interaction', temp_object=temp_object)
tdef = dc_workflow_interaction_value_dict.get(tid)
if tdef.title:
interaction.setTitle(tdef.title)
......@@ -1149,7 +1149,7 @@ def convertToERP5Workflow(self, temp_object=False):
var_exprs = {}
else: var_exprs = origin_tdef.var_exprs
for key in var_exprs:
tr_var = transition.newContent(portal_type='Transition Variable', temp_object=temp_object)
tr_var = transition.newContent(portal_type='Workflow Transition Variable', temp_object=temp_object)
tr_var.setReference(key)
tr_var.setVariableDefaultExpression(var_exprs[key].text)
tr_var_path = getattr(workflow, 'variable_'+key).getPath()
......@@ -1165,7 +1165,7 @@ def convertToERP5Workflow(self, temp_object=False):
var_exprs = {}
else: var_exprs = origin_tdef.var_exprs
for key in var_exprs:
tr_var = interaction.newContent(portal_type='Transition Variable', temp_object=temp_object)
tr_var = interaction.newContent(portal_type='Workflow Transition Variable', temp_object=temp_object)
tr_var.setReference(key)
tr_var.setVariableDefaultExpression(var_exprs[key].text)
tr_var_path = getattr(workflow, 'variable_'+key).getPath()
......
......@@ -129,7 +129,7 @@ class TestERP5Type(ERP5TypeTestCase, LogInterceptor):
wf = self.portal.portal_workflow.delivery_causality_workflow
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
dummy_transition = wf.newContent(portal_type='Transition',
dummy_transition = wf.newContent(portal_type='Workflow Transition',
reference='dummy_workflow_method',
trigger_type=TRIGGER_WORKFLOW_METHOD)
self.commit()
......
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