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

ERP5Workflow: Rename Portal Types.

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