Commit 6341787e authored by iv's avatar iv

ERP5Workflow: revert changes on changing actbox_foo to action_box_foo

parent b0018a19
......@@ -83,9 +83,9 @@ def getWorkflowGraph(workflow):\n
dict(_class=\'workflow.transition\',\n
source=state.getId(),\n
destination=transition.getDestinationId(),\n
name=transition.getActionBoxName() or transition.getTitleOrId(),\n
name=transition.getActboxName() or transition.getTitleOrId(),\n
description=transition.getDescription(),\n
actbox_url=transition.getActionBoxUrl(),\n
actbox_url=transition.getActboxUrl(),\n
transition_id=transition.getId() # used for edition.\n
))\n
else:\n
......
......@@ -92,10 +92,10 @@
<string>my_title</string>
<string>my_destination_title</string>
<string>my_guard_expression</string>
<string>my_action_box_name</string>
<string>my_action_box_url</string>
<string>my_action_box_icon</string>
<string>my_action_box_category</string>
<string>my_actbox_name</string>
<string>my_actbox_url</string>
<string>my_actbox_icon</string>
<string>my_actbox_category</string>
<string>my_trigger_type</string>
</list>
</value>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_category</string> </value>
<value> <string>my_actbox_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_icon</string> </value>
<value> <string>my_actbox_icon</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_name</string> </value>
<value> <string>my_actbox_name</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -18,7 +18,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_url</string> </value>
<value> <string>my_actbox_url</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -95,10 +95,10 @@
<string>my_matched_simulation_state_list</string>
<string>my_matched_validation_state_list</string>
<string>my_matched_causality_state</string>
<string>my_action_box_name</string>
<string>my_action_box_url</string>
<string>my_action_box_icon</string>
<string>my_action_box_category</string>
<string>my_actbox_name</string>
<string>my_actbox_url</string>
<string>my_actbox_icon</string>
<string>my_actbox_category</string>
</list>
</value>
</item>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_category</string> </value>
<value> <string>my_actbox_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_icon</string> </value>
<value> <string>my_actbox_icon</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_name</string> </value>
<value> <string>my_actbox_name</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -18,7 +18,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_action_box_url</string> </value>
<value> <string>my_actbox_url</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>action_box_category</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action_box_category_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>action_box_icon</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action_box_icon_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>action_box_url</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action_box_url_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -30,9 +30,7 @@
</item>
<item>
<key> <string>storage_id</string> </key>
<value>
<none/>
</value>
<value> <string>trigger_type</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actbox_category_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>actbox_category</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actbox_icon_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>actbox_icon</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actbox_name_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>actbox_name</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,10 +14,6 @@
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>action_box_name</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......@@ -26,18 +22,22 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action_box_name_property</string> </value>
<value> <string>actbox_url_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<key> <string>property_default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>actbox_url</string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -154,7 +154,6 @@ SortIndex
SQLIdGenerator
StandardBT5ConfiguratorItem
StandardProperty
State
StockCapacity
SupplyLine
SupplyLink
......@@ -176,7 +175,6 @@ TradeOrderLine
TradePreference
Transformation
TransformedResource
Transition
TranslatableProperty
Url
Variable
......@@ -186,13 +184,7 @@ Version
VcsPreference
WebSection
WebSite
Workflow
XMLObject
AttributeBlacklistedConstraint
CaptchaPreference
GeographicalPoint
Interaction
InteractionWorkflow
WorkflowConfigurator
WorkflowScript
Worklist
\ No newline at end of file
......@@ -69,9 +69,9 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
# these attributes are definded in old interaction but no evidence that
# they are in use
action_box_name = ''
action_box_url = ''
action_box_category = 'workflow'
actbox_name = ''
actbox_url = ''
actbox_category = 'workflow'
# Declarative security
security = ClassSecurityInfo()
......
......@@ -405,13 +405,11 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
# 1. Interaction as XML
interaction_reference_list = []
interaction_list = self.objectValues(portal_type='Interaction')
interaction_prop_id_to_show = sorted(['action_box_category', 'action_box_url',
'action_box_name', 'activate_script_name', 'after_script_name',
'before_commit_script_name', 'description', 'groups', 'roles', 'expr',
'permissions', 'method_id', 'once_per_transaction', 'portal_type_filter',
'portal_type_group_filter','script_name', 'temporary_document_disallowed',
'trigger_type'])
interaction_prop_id_to_show = sorted(['actbox_category', 'actbox_url', 'actbox_name',
'activate_script_name', 'after_script_name', 'before_commit_script_name',
'description', 'groups', 'roles', 'expr', 'permissions', 'method_id',
'once_per_transaction', 'portal_type_filter', 'portal_type_group_filter',
'script_name', 'temporary_document_disallowed', 'trigger_type'])
for tdef in interaction_list:
interaction_reference_list.append(tdef.getReference())
interactions = SubElement(interaction_workflow, 'interactions', attrib=dict(
......@@ -435,8 +433,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
property_value = tdef.getExpression()
sub_object = SubElement(guard, property_id, attrib=dict(type='guard configuration'))
# no-property definded action box configuration
elif property_id in ['action_box_name', 'action_box_url', 'action_box_category',
'trigger_type']:
elif property_id in ['actbox_name', 'actbox_url', 'actbox_category', 'trigger_type']:
property_value = getattr(tdef, property_id, None)
sub_object = SubElement(interaction, property_id, attrib=dict(type='string'))
elif property_id in ['activate_script_name', 'after_script_name', 'before_commit_script_name',
......
......@@ -61,10 +61,10 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
isRADContent = 1
trigger_type = TRIGGER_USER_ACTION #zwj: type is int 0, 1, 2
guard = None
action_box_name = ''
action_box_url = ''
action_box_icon = ''
action_box_category = 'workflow'
actbox_name = ''
actbox_url = ''
actbox_icon = ''
actbox_category = 'workflow'
var_exprs = None # A mapping.
default_reference = ''
# Declarative security
......
......@@ -314,18 +314,18 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
for tid in sdef.getDestinationIdList():
tdef = self._getOb(id=tid)
if tdef is not None and tdef.getTriggerType() == TRIGGER_USER_ACTION and \
tdef.getActionBoxName() and self._checkTransitionGuard(tdef, document):
tdef.getActboxName() and self._checkTransitionGuard(tdef, document):
if fmt_data is None:
fmt_data = TemplateDict()
fmt_data._push(info)
fmt_data._push({'transition_id': tdef.getReference()})
res.append((tid, {
'id': tdef.getReference(),
'name': tdef.getActionBoxName() % fmt_data,
'url': str(tdef.getActionBoxUrl()) % fmt_data,
'icon': str(tdef.getActionBoxIcon()) % fmt_data,
'name': tdef.getActboxName() % fmt_data,
'url': str(tdef.getActboxUrl()) % fmt_data,
'icon': str(tdef.getActboxIcon()) % fmt_data,
'permissions': (), # Predetermined.
'category': tdef.getActionBoxCategory(),
'category': tdef.getActboxCategory(),
'transition': tdef}))
fmt_data._pop()
res.sort()
......@@ -360,7 +360,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
workflow_id = self.getId()
workflow_title = self.getTitle()
for worklist_definition in self.getWorklistValueList():
action_box_name = worklist_definition.getActionBoxName()
action_box_name = worklist_definition.getActboxName()
guard = worklist_definition.getGuard()
if action_box_name:
variable_match = {}
......@@ -408,8 +408,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
'worklist_id': worklist_id,
'workflow_title': workflow_title,
'workflow_id': workflow_id,
'action_box_url': worklist_definition.getActionBoxUrl(),
'action_box_category': worklist_definition.getActionBoxCategory()}
'action_box_url': worklist_definition.getActboxUrl(),
'action_box_category': worklist_definition.getActboxCategory()}
variable_match_dict[worklist_id] = variable_match
......@@ -833,8 +833,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
transition_reference_list = []
transition_list = self.objectValues(portal_type='Transition')
transition_prop_id_to_show = ['description', 'new_state_id',
'trigger_type', 'script_name', 'after_script_name', 'action_box_category',
'action_box_icon', 'action_box_name', 'action_box_url', 'roles', 'groups',
'trigger_type', 'script_name', 'after_script_name', 'actbox_category',
'actbox_icon', 'actbox_name', 'actbox_url', 'roles', 'groups',
'permissions', 'expr', 'transition_variable']
for tdef in self.objectValues(portal_type='Transition'):
transition_reference_list.append(tdef.getReference())
......@@ -935,8 +935,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
worklist_list = self.objectValues(portal_type='Worklist')
worklist_prop_id_to_show = ['description', 'matched_portal_type_list',
'matched_validation_state_list', 'matched_simulation_state_list',
'action_box_category', 'action_box_name', 'action_box_url',
'action_box_icon', 'roles', 'groups', 'permissions', 'expr']
'actbox_category', 'actbox_name', 'actbox_url', 'actbox_icon',
'roles', 'groups', 'permissions', 'expr']
for qdef in worklist_list:
worklist_reference_list.append(qdef.getReference())
worklists = SubElement(workflow, 'worklists', attrib=dict(worklist_list=str(worklist_reference_list),
......
......@@ -57,10 +57,10 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
description = ''
var_matches = [] # Compared with catalog when set.
matched_portal_type = ''
action_box_name = ''
action_box_url = ''
action_box_icon = ''
action_box_category = 'global'
actbox_name = ''
actbox_url = ''
actbox_icon = ''
actbox_category = 'global'
guard = None
default_reference = ''
# Declarative security
......
......@@ -300,10 +300,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
transition.setTitle(tdef.title)
transition.setReference(tdef.id)
transition.setTriggerType(tdef.trigger_type)
transition.setActionBoxCategory(tdef.actbox_category)
transition.setActionBoxIcon(tdef.actbox_icon)
transition.setActionBoxName(tdef.actbox_name)
transition.setActionBoxUrl(tdef.actbox_url)
transition.setActboxCategory(tdef.actbox_category)
transition.setActboxIcon(tdef.actbox_icon)
transition.setActboxName(tdef.actbox_name)
transition.setActboxUrl(tdef.actbox_url)
transition.setDescription(tdef.description)
if tdef.after_script_name is not None:
# check after script is a Transion or a Script:
......@@ -412,10 +412,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
else:
worklist_variable_value.setVariableValue(values[0]) #to be changed?
worklist.setActionBoxUrl(qdef.actbox_url)
worklist.setActionBoxCategory(qdef.actbox_category)
worklist.setActionBoxIcon(qdef.actbox_icon)
worklist.setActionBoxName(qdef.actbox_name)
worklist.setActboxUrl(qdef.actbox_url)
worklist.setActboxCategory(qdef.actbox_category)
worklist.setActboxIcon(qdef.actbox_icon)
worklist.setActboxName(qdef.actbox_name)
# configure guard
if qdef.guard:
worklist.guard = qdef.guard
......
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