Commit dca0053b authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5Workflow: Worklist is a Predicate.

This commit is going to be squashed into:
  ERP5Workflow: DC Workflows are now ERP5 objects (!1378).
  ERP5Workflow: Migrate all DCWorkflows to ERP5 objects (!1378).

Worklist filter objects based on given criterions and thus it makes more sense
for a Worklist to be a Predicate (albeit a Predicate with only Identity Criterion
and nothing else).

Criterion Properties:
  * State Variable.
  * local_roles (SECURITY_PARAMETER_ID): No more ad-hoc check_roles parameter on checkGuard().
  * Any Workflow Variable with for_catalog == 1.
  * Introduce getIdentityCriterionDict()

Also:
  * Remove "ad-hoc" matched* properties: This sounds like a premature optimization.
  * No need for Worklist Variable as these use "normal" Workflow Variables (where for_catalog == 1).
parent 9b882ed5
......@@ -30,6 +30,7 @@
import re
from erp5.component.mixin.TestWorkflowMixin import TestWorkflowMixin
from Products.ERP5Type.tests.utils import todo_erp5
class TestWorklist(TestWorkflowMixin):
......@@ -172,51 +173,23 @@ class TestWorklist(TestWorkflowMixin):
worklist_value.setAction(str(actbox_url))
worklist_value.setActionType('global')
props={k if k.startswith('guard_') else 'variable_' + k: v
for k, v in kw.iteritems()}
if 'variable_portal_type' in props:
v = props.get('variable_portal_type', None)
if v:
worklist_value.setMatchedPortalTypeList(v)
if 'variable_validation_state' in props:
v = props.get('variable_validation_state', None)
if v:
worklist_value.setMatchedValidationState(v)
if 'variable_' + self.int_catalogued_variable_id in props:
variable_ref = self.int_catalogued_variable_id
v = props.get('variable_'+self.int_catalogued_variable_id, None)
if v:
# Add a local worklist variable:
variable_value = worklist_value._getOb('variable_' + self.int_catalogued_variable_id, None)
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='Worklist Variable')
variable_value.setReference(variable_ref)
variable_value.setVariableDefaultValue(str(v))
# test04 related key
if 'variable_region_uid' in props:
v = props.get('variable_region_uid', None)
if v:
variable_value = worklist_value._getOb('variable_region_uid', None)
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='Worklist Variable')
variable_value.setReference('region_uid')
variable_value.setVariableDefaultExpression(v)
if 'variable_base_category_id' in props:
variable_value = worklist_value._getOb('variable_base_category_id', None)
v = props.get('variable_base_category_id', None)
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='Worklist Variable')
variable_value.setReference('base_category_id')
variable_value.setVariableDefaultValue(v)
# Update guard configuration for view and guard value.
if 'guard_roles' in props:
v = props.get('guard_roles', '')
if v:
worklist_value.setGuardRoleList([ var.strip() for var in v.split(';') ])
if 'guard_expr' in props:
v = props.get('guard_expr', '')
from Products.ERP5Type.Tool.WorkflowTool import SECURITY_PARAMETER_ID
v = kw.pop('guard_expr', None)
if v:
worklist_value.setGuardExpression(v)
v = kw.pop('guard_roles', None)
if v:
worklist_value.setCriterion(SECURITY_PARAMETER_ID,
[var.strip() for var in v.split(';')])
for k, v in kw.iteritems():
if k not in (SECURITY_PARAMETER_ID, workflow_value.getStateVariable()):
variable_value = workflow_value.getVariableValueByReference(k)
if variable_value is None:
workflow_value.newContent(portal_type='Workflow Variable', reference=k)
worklist_value.setCriterion(k, (v,))
else:
worklists = workflow_value.worklists
worklists.addWorklist(worklist_id)
......@@ -238,25 +211,42 @@ class TestWorklist(TestWorkflowMixin):
worklists.deleteWorklists(worklist_id_list)
def createWorklists(self):
for worklist_id, actbox_name, role, expr, state, int_variable in [
(self.worklist_assignor_id, self.actbox_assignor_name,
'Assignor', None, self.checked_validation_state, None),
(self.worklist_owner_id, self.actbox_owner_name,
'Owner', None, self.checked_validation_state, None),
(self.worklist_desactivated_id, self.actbox_desactivated_by_expression,
'Owner', 'python: 0', self.checked_validation_state, None),
(self.worklist_wrong_state_id, self.actbox_wrong_state,
'Owner', None, self.not_checked_validation_state, None),
(self.worklist_assignor_owner_id, self.actbox_assignor_owner_name,
'Assignor; Owner', None, self.checked_validation_state, None),
(self.worklist_int_variable_id, self.actbox_int_variable_name,
None, None, None, str(self.int_value)),
]:
self.createWorklist(self.checked_workflow, worklist_id, actbox_name,
guard_roles=role, guard_expr=expr,
self.createWorklist(self.checked_workflow,
self.worklist_assignor_id,
self.actbox_assignor_name,
portal_type=self.checked_portal_type,
guard_roles='Assignor',
validation_state=self.checked_validation_state)
self.createWorklist(self.checked_workflow,
self.worklist_owner_id,
self.actbox_owner_name,
portal_type=self.checked_portal_type,
guard_roles='Owner',
validation_state=self.checked_validation_state)
self.createWorklist(self.checked_workflow,
self.worklist_desactivated_id,
self.actbox_desactivated_by_expression,
portal_type=self.checked_portal_type,
guard_roles='Owner',
guard_expr='python: 0',
validation_state=self.checked_validation_state)
self.createWorklist(self.checked_workflow,
self.worklist_wrong_state_id,
self.actbox_wrong_state,
portal_type=self.checked_portal_type,
guard_roles='Owner',
validation_state=self.not_checked_validation_state)
self.createWorklist(self.checked_workflow,
self.worklist_assignor_owner_id,
self.actbox_assignor_owner_name,
portal_type=self.checked_portal_type,
validation_state=state,
**{self.int_catalogued_variable_id: int_variable})
guard_roles='Assignor; Owner',
validation_state=self.checked_validation_state)
self.createWorklist(self.checked_workflow,
self.worklist_int_variable_id,
self.actbox_int_variable_name,
portal_type=self.checked_portal_type,
**{self.int_catalogued_variable_id: str(self.int_value)})
def removeWorklists(self):
self.removeWorklist(self.checked_workflow, [
......@@ -516,11 +506,11 @@ class TestWorklist(TestWorkflowMixin):
self.removeWorklist(self.checked_workflow,
['guard_expression_worklist'])
@todo_erp5
def test_04_dynamic_variables(self):
"""
Test related keys and TALES Expression
"""
workflow_tool = self.getWorkflowTool()
self.createManagerAndLogin()
......
......@@ -4,8 +4,6 @@ It includes some copy / paste of code from DCWorkflow. Refactoring
needed through DCWorkflow API extension.
"""
kw = {}
# Try to access the workflow defined by the action
try:
workflow_tool = context.portal_workflow
......@@ -15,8 +13,7 @@ except AttributeError:
# If this is a worklist action, read the worklist definition
worklist = workflow.getWorklistValueByReference(action['worklist_id'])
for varkey in worklist.getVarMatchKeys():
kw[varkey] = worklist.getVarMatch(varkey)
kw = worklist.getIdentityCriterionDict()
# Automatically filter workflists per portal type
# so that the same state can be used for different
......
......@@ -13,9 +13,10 @@ workflow = portal.portal_workflow.ticket_workflow
workflow_state_var = workflow.variables.getStateVar()
for worklist in workflow.worklists.objectValues():
identity_criterion_dict = worklist.getIdentityCriterionDict()
if portal_type \
and 'portal_type' in worklist.getVarMatchKeys() \
and portal_type not in worklist.getVarMatch('portal_type'):
and 'portal_type' in worklist.getCriterionPropertyList() \
and portal_type not in identity_criterion_dict.get('portal_type'):
continue
query_list = [{
......@@ -27,8 +28,7 @@ for worklist in workflow.worklists.objectValues():
'value': role, } for role in worklist.getGuardRoleList()]
}]
for key in worklist.getVarMatchKeys():
value = worklist.getVarMatch(key)
for key, value in identity_criterion_dict.iteritems():
if key == workflow_state_var:
# instead of having {'validation_state': 'draft'}, we want to have
# {'translated_validation_state_title': 'Brouillon'}
......
......@@ -65,7 +65,7 @@ class TestDomainTool(TestPredicateMixIn):
portal_type=['!=%s' % x for x
in domain_tool.getPortalRuleTypeList()
+ ('Base Domain', 'Contribution Predicate',
'Solver Type', 'Trade Model Path')
'Solver Type', 'Trade Model Path', 'Worklist')
+ domain_tool.getPortalDivergenceTesterTypeList()
+ domain_tool.getPortalBusinessProcessTypeList()
+ domain_tool.getPortalBusinessLinkTypeList()
......
......@@ -30,7 +30,9 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
......@@ -71,7 +73,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Variable_view</string> </value>
<value> <string>string:${object_url}/WorkflowVariable_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -2,61 +2,72 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<none/>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<none/>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Worklist Variable</string> </value>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>init_script</string> </key>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<none/>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<none/>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
<key> <string>description</string> </key>
<value> <string>Workflow Action Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>WorklistVariable</string> </value>
<key> <string>id</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
<key> <string>title</string> </key>
<value> <string>global</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -2,82 +2,72 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<none/>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>View</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
<key> <string>description</string> </key>
<value> <string>Workflow Action Type</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
<key> <string>id</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WorklistVariable_view</string> </value>
<key> <string>title</string> </key>
<value> <string>workflow</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -151,7 +151,4 @@
<item>Interaction Workflow</item>
<item>Workflow</item>
</portal_type>
<portal_type id="Worklist">
<item>Worklist Variable</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
......@@ -113,7 +113,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Variable_view</string> </value>
<value> <string>WorkflowVariable_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_reference</string>
<string>my_variable_default_value</string>
<string>my_variable_default_expression</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WorklistVariable_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Variable_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Variable</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_reference_as_name</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Variable Name</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_variable_default_expression</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Variable Expression (Overrides Variable Value)</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
workflow = context.getParentValue()
state_variable = workflow.getStateVariable()
from Products.ERP5Type.Tool.WorkflowTool import SECURITY_PARAMETER_ID
item_list = [(state_variable, state_variable),
(SECURITY_PARAMETER_ID, SECURITY_PARAMETER_ID)]
for variable in workflow.getVariableValueList():
if variable.isForCatalog():
variable_reference = variable.getReference()
item_list.append((variable_reference, variable_reference))
return item_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Worklist_getCriterionPropertyItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -35,7 +35,24 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
<value> <string>Predicate_edit</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list>
<string>membership_criterion_category_list</string>
<string>membership_criterion_document_list</string>
</list>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
......@@ -80,7 +97,9 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
<list>
<string>listbox_identity</string>
</list>
</value>
</item>
<item>
......@@ -90,10 +109,7 @@
<string>my_id</string>
<string>my_reference</string>
<string>my_title</string>
<string>my_matched_portal_type_list</string>
<string>my_matched_simulation_state_list</string>
<string>my_matched_validation_state_list</string>
<string>my_matched_causality_state_list</string>
<string>my_criterion_property_list</string>
<string>my_action_name</string>
<string>my_action</string>
<string>my_icon</string>
......@@ -152,6 +168,10 @@
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>items</string>
<string>title</string>
</list>
</value>
......@@ -42,6 +42,10 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -57,6 +61,10 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -64,18 +72,37 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The category of the transition displayed in Action Box.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
<value> <string>my_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list>
<tuple>
<string></string>
<string></string>
</tuple>
<tuple>
<string>global</string>
<string>global</string>
</tuple>
<tuple>
<string>workflow</string>
<string>workflow</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Display in Action Box Category</string> </value>
......
......@@ -2,13 +2,13 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<global name="MultiListField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_variable_default_value</string> </value>
<value> <string>my_criterion_property_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -23,8 +23,8 @@
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
<key> <string>unknown_selection</string> </key>
<value> <string>You selected an item that was not in the list.</string> </value>
</item>
</dictionary>
</value>
......@@ -49,14 +49,6 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
......@@ -73,12 +65,16 @@
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -86,11 +82,11 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -98,7 +94,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......@@ -124,14 +120,6 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
......@@ -149,23 +137,29 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -173,7 +167,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......@@ -193,20 +187,14 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value>
<list/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>50</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
......@@ -224,36 +212,42 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string>text</string> </value>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Variable Value</string> </value>
<key> <string>size</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
<key> <string>title</string> </key>
<value> <string>Criterion Properties</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
<key> <string>view_separator</string> </key>
<value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item>
</dictionary>
</value>
......@@ -261,4 +255,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Worklist_getCriterionPropertyItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_matched_causality_state_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_parallel_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Matched Causality State</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_matched_portal_type_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_parallel_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Cataloged Portal Type Matches</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x.getId(), x.getId()) for x in here.getPortalObject().portal_types.objectValues()]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_matched_simulation_state_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_parallel_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Matched Simulation State</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_matched_validation_state_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_parallel_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Matched Validation State</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -181,7 +181,6 @@ Workflow | update_security_roles
Workflow | variable_view
Workflow | view
Workflow | worklist_view
Worklist Variable | view
Worklist | view
ZODB Continuous Increasing Id Generator | view
portal_actions | bt_tool
......
......@@ -80,4 +80,3 @@ Workflow | Transition
Workflow | Workflow Script
Workflow | Workflow Variable
Workflow | Worklist
\ No newline at end of file
Worklist | Worklist Variable
\ No newline at end of file
......@@ -103,5 +103,4 @@ Workflow Script
Workflow Tool
Workflow Variable
Worklist
Worklist Variable
ZODB Continuous Increasing Id Generator
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Workflow and Worklist variable</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Variable</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -26,7 +26,9 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Workflow-only properties (as opposed to Variable Property Sheet for properties shared by Worklist and Workflow variables) </string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Worklist</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</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/lines</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>matched_causality_state</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matched_causality_state_property</string> </value>
</item>
<item>
<key> <string>multivalued</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: []</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/lines</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matched_portal_type_property</string> </value>
</item>
<item>
<key> <string>multivalued</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: []</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/lines</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matched_simulation_state_property</string> </value>
</item>
<item>
<key> <string>multivalued</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: []</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/lines</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matched_validation_state_property</string> </value>
</item>
<item>
<key> <string>multivalued</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: []</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -179,7 +179,6 @@ TransformedResource
Transition
TranslatableProperty
Url
Variable
WorkflowVariable
Guard
Variation
......@@ -194,4 +193,3 @@ AttributeBlacklistedConstraint
CaptchaPreference
GeographicalPoint
Interaction
\ No newline at end of file
Worklist
\ No newline at end of file
......@@ -510,21 +510,7 @@ class Workflow(XMLObject):
action_box_name = worklist_definition.getActionName()
guard_role_list = worklist_definition.getGuardRoleList()
if action_box_name:
variable_match = {}
for key in worklist_definition.getVarMatchKeys():
var = worklist_definition.getVarMatch(key)
if isinstance(var, Expression):
if state_change_information is None:
state_change_information = StateChangeInfo(portal, self,
kwargs=info.__dict__.copy())
if expression_context is None:
expression_context = createExpressionContext(state_change_information)
evaluated_value = var(expression_context)
if isinstance(evaluated_value, (str, int, long)):
evaluated_value = [str(evaluated_value)]
else:
evaluated_value = [x % info for x in var]
variable_match[key] = evaluated_value
variable_match = worklist_definition.getIdentityCriterionDict()
portal_type_match = variable_match.get('portal_type')
if portal_type_match:
# in case the current workflow is not associated with portal_types
......@@ -540,8 +526,7 @@ class Workflow(XMLObject):
not check_guard or
worklist_definition.checkGuard(security_manager,
self,
portal,
check_roles=False)
portal)
):
format_data = TemplateDict()
format_data._push(info)
......
......@@ -54,7 +54,6 @@ class WorkflowVariable(IdAsReferenceMixin("variable_"),
'DublinCore',
'Reference',
'Comment',
'Variable',
'Guard',
'WorkflowVariable',
)
......@@ -35,15 +35,19 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.mixin.guardable import GuardableMixin
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type.Utils import deprecated
tales_re = re.compile(r'(\w+:)?(.*)')
class Worklist(IdAsReferenceMixin("worklist_"), XMLObject, GuardableMixin):
class Worklist(IdAsReferenceMixin("worklist_"), GuardableMixin, Predicate):
"""
A ERP5 Worklist.
Four Variable: portal_type; simulation_state; validation_state; causality_state
can be accessed directly; other dynamic variables will be accessable through
content type "Worklist Variable".
ERP5 Worklist.
Variables:
- Workflow Variable where for_catalog == 1.
- State Variable.
- SECURITY_PARAMETER_ID (local_roles).
"""
meta_type = 'ERP5 Worklist'
portal_type = 'Worklist'
......@@ -59,134 +63,23 @@ class Worklist(IdAsReferenceMixin("worklist_"), XMLObject, GuardableMixin):
'DublinCore',
'Reference',
'Comment',
'Worklist',
'Guard',
'ActionInformation',
'Predicate',
)
security.declareProtected(Permissions.AccessContentsInformation,
'getAvailableCatalogVars')
def getAvailableCatalogVars(self):
parent = self.getParentValue()
res = [parent.getStateVariable()]
res += [variable.getId() for variable in self.objectValues()]
res += [variable for variable in
parent.contentValues(portal_type="Workflow Variable")
if variable.getForCatalog()]
res.sort()
return res
security.declareProtected(Permissions.ModifyPortalContent,
'updateDynamicVariable')
def updateDynamicVariable(self):
# Keep worklist variables updating, correspond to workflow variables.
# In the new workflow, we may not need this function for the moment.
res = []
# XXX(WORKFLOW): is there a reason not to return self.objectValues() here?
for worklist_variable_value in self.objectValues():
res.append(worklist_variable_value)
return res
def _updateDynamicVariable(self):
# Keep worklist variables updating, correspond to workflow variables.
res = []
workflow_variable_id_list = []
default_variable_id_list = ['variable_action', 'variable_actor',\
'variable_comment', 'variable_error_message', 'variable_history',\
'variable_portal_type', 'variable_time']
# Check workflow variables:
for variable_value in self.getParentValue().objectValues(portal_type="Workflow Variable"):
variable_id = variable_value.getId()
workflow_variable_id_list.append(variable_id)
worklist_variable_value = self._getOb(variable_id, None)
if (worklist_variable_value is None
and variable_value.getForCatalog() == 1
and variable_id not in default_variable_id_list):
variable_value_ref = variable_value.getReference()
worklist_variable_value = self.newContent(portal_type='Worklist Variable')
worklist_variable_value.setReference(variable_value_ref)
worklist_variable_value.setVariableDefaultExpression(variable_value.getVariableDefaultExpression())
worklist_variable_value.setVariableDefaultValue(variable_value.getVariableDefaultValue())
res.append(worklist_variable_value)
if (worklist_variable_value and worklist_variable_value not in res
and variable_value.getForCatalog() == 1):
res.append(worklist_variable_value)
if (worklist_variable_value in res
and variable_value.getForCatalog() == 0):
self._delObject(variable_id)
res.remove(worklist_variable_value)
# Append user created worklist variables.
for worklist_variable_value in self.objectValues():
if worklist_variable_value.getId() not in workflow_variable_id_list:
res.append(worklist_variable_value)
workflow_variable_id_list.append(worklist_variable_value.getId())
return res
security.declareProtected(Permissions.AccessContentsInformation,
'getVarMatchKeys')
def getVarMatchKeys(self):
key_list = []
if self.getMatchedPortalTypeList():
key_list.append('portal_type')
if self.getMatchedSimulationStateList():
key_list.append('simulation_state')
if self.getMatchedValidationStateList():
key_list.append('validation_state')
if self.getMatchedCausalityState():
key_list.append('causality_state')
key_list += [dynamic_variable.getReference() for dynamic_variable in self.objectValues()
if dynamic_variable.getVariableDefaultValue() or dynamic_variable.getVariableDefaultExpression()]
return key_list
security.declareProtected(Permissions.AccessContentsInformation,
'getVarMatch')
def getVarMatch(self, id):
""" return value of matched keys"""
matches = None
if id == 'portal_type':
v = self.getMatchedPortalTypeList()
if v: matches = tuple(v)
elif id in ['validation_state', 'simulation_state', 'causality_state']:
if id == 'validation_state':
match_reference_list = self.getMatchedValidationStateList()
elif id == 'simulation_state':
match_reference_list = self.getMatchedSimulationStateList()
elif id == 'causality_state':
match_reference_list = self.getMatchedCausalityStateList()
matches = tuple(match_reference_list)
elif id:
# Local dynamic variable:
dynamic_variable = self._getOb('variable_'+id)
dynamic_variable_value = dynamic_variable.getVariableDefaultValue()
if dynamic_variable_value:
matches = [dynamic_variable_value]
# Override initial value if expression set:
dynamic_variable_default_expression = dynamic_variable.getVariableDefaultExpressionInstance()
if dynamic_variable_default_expression:
matches = dynamic_variable_default_expression
if matches not in ([], None):
if not isinstance(matches, (tuple, Expression)):
# Old version, convert it.
matches = tuple(matches)
return matches
else:
return ()
security.declareProtected(Permissions.AccessContentsInformation,
'getVarMatchText')
def getVarMatchText(self, id):
values = self.getVarMatch(id)
if isinstance(values, Expression):
return values.text
return '; '.join(values)
'getIdentityCriterionDict')
def getIdentityCriterionDict(self):
"""
XXX: Move this to Predicate class?
"""
try:
return dict(self._identity_criterion)
except AttributeError:
return {}
# XXX(PERF): hack to see Category Tool responsability in new workflow slowness
security.declareProtected(Permissions.AccessContentsInformation,
'getActionType')
def getActionType(self):
......@@ -197,3 +90,17 @@ class Worklist(IdAsReferenceMixin("worklist_"), XMLObject, GuardableMixin):
return action_type_list[0]
except IndexError:
return None
from Products.ERP5Type import WITH_LEGACY_WORKFLOW
if WITH_LEGACY_WORKFLOW:
Worklist.security.declareProtected(Permissions.AccessContentsInformation,
'getVarMatchKeys')
Worklist.getVarMatchkeys = \
deprecated('getVarMatchKeys() deprecated; use getCriterionPropertyList()')\
(lambda self: self.getCriterionPropertyList())
Worklist.security.declareProtected(Permissions.AccessContentsInformation,
'getVarMatch')
Worklist.getVarMatch = \
deprecated('getVarMatch() deprecated; use getIdentityCriterionDict()')\
(lambda self, id: tuple(self._identity_criterion.get(id, ())))
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.ERP5Type.Core.WorkflowVariable import WorkflowVariable
class WorklistVariable(WorkflowVariable):
"""
A ERP5 Worklist Variable which serves as dynamic variable of Worklist.
This type of object has 3 values:
- reference as Title;
- variable_default_value;
- variable_default_expression which will override default when it's set.
"""
property_sheets = (
'Base',
'XMLObject',
'CategoryCore',
'DublinCore',
'Reference',
'Variable',
'Guard',
)
......@@ -89,9 +89,6 @@ class PropertySheetTool(BaseTool):
'Comment',
# for workflows
'Guard',
'Variable',
'Variable/variable_default_expression_property',
'Variable/variable_default_value_property',
'WorkflowVariable',
'Interaction',
'ActionInformation/action_name_property',
......@@ -103,7 +100,7 @@ class PropertySheetTool(BaseTool):
'State/acquire_permission_property',
'State/selected_property',
'State/state_type_property',
'Worklist',
'Predicate',
'Workflow',
'Workflow/manager_bypass_property',
'Workflow/state_variable_property',
......
......@@ -46,9 +46,12 @@ from sets import ImmutableSet
from zLOG import LOG, WARNING
WORKLIST_METADATA_KEY = 'metadata'
SECURITY_PARAMETER_ID = 'local_roles'
COUNT_COLUMN_TITLE = 'count'
SECURITY_PARAMETER_ID = 'local_roles'
from AccessControl.SecurityInfo import ModuleSecurityInfo
ModuleSecurityInfo(__name__).declarePublic('SECURITY_PARAMETER_ID')
class WorkflowTool(BaseTool, OriginalWorkflowTool):
"""
A new container for DC workflow and workflow;
......
......@@ -50,7 +50,6 @@ class GuardableMixin(ExpressionMixin('guard_expression')):
security_manager,
workflow,
current_object,
check_roles=True,
**kw):
"""
Checks conditions in this guard. Original source code from DCWorkflow
......@@ -78,7 +77,6 @@ class GuardableMixin(ExpressionMixin('guard_expression')):
break
else:
return False
if check_roles:
guard_role_list = self.getGuardRoleList()
if guard_role_list:
# Require at least one of the given roles.
......
......@@ -875,6 +875,9 @@ def method_getGuardExpressionInstance(self):
def method_checkGuard(self, *args, **kwargs):
return ERP5Guardable.checkGuard.im_func(self, *args, **kwargs)
def method_getIdentityCriterionDict(self):
return {k: self.getVarMatch(k) for k in self.getVarMatchKeys()}
def method_getAction(self):
return self.actbox_url
def method_getActionType(self):
......@@ -1045,35 +1048,24 @@ def convertToERP5Workflow(self, temp_object=False):
worklist.setTitle(qdef.title)
worklist.setReference(qdef.id)
worklist.setDescription(qdef.description)
for key, values in qdef.var_matches.items():
if key == 'portal_type':
worklist.setMatchedPortalTypeList(values)
elif key == 'simulation_state':
worklist.setMatchedSimulationStateList(values)
elif key == 'validation_state':
worklist.setMatchedValidationStateList(values)
elif key == 'causality_state':
worklist.setMatchedCausalityState(values)
else:
# dynamic variable.
worklist_variable_value = worklist.newContent(portal_type='Worklist Variable',
reference=key)
if isinstance(values, Expression):
worklist_variable_value.setVariableDefaultExpression(values.text)
else:
worklist_variable_value.setVariableDefaultValue(values[0]) #XXX(WORKFLOW): to be changed
criterion_property_list = qdef.var_matches.keys()
for key, value in qdef.var_matches.items():
worklist.setCriterion(key, value)
worklist.setAction(qdef.actbox_url)
worklist.setActionType(qdef.actbox_category)
worklist.setIcon(qdef.actbox_icon)
worklist.setActionName(qdef.actbox_name)
# configure guard
if qdef.guard:
worklist.setGuardRoleList(qdef.guard.roles)
from Products.ERP5Type.Tool.WorkflowTool import SECURITY_PARAMETER_ID
if qdef.guard.roles:
worklist.setCriterion(SECURITY_PARAMETER_ID, qdef.guard.roles)
criterion_property_list.append(SECURITY_PARAMETER_ID)
worklist.setGuardPermissionList(qdef.guard.permissions)
worklist.setGuardGroupList(qdef.guard.groups)
if qdef.guard.expr is not None:
worklist.setGuardExpression(qdef.guard.expr.text)
worklist.setCriterionPropertyList(criterion_property_list)
elif workflow_class_name == 'InteractionWorkflowDefinition':
dc_workflow_interaction_value_dict = self.interactions
# create interactions (portal_type = Interaction)
......@@ -1284,6 +1276,7 @@ WorklistDefinition.getGuardGroupList = method_getGuardGroupList
WorklistDefinition.getGuardPermissionList = method_getGuardPermissionList
WorklistDefinition.getGuardExpressionInstance = method_getGuardExpressionInstance
WorklistDefinition.checkGuard = method_checkGuard
WorklistDefinition.getIdentityCriterionDict = method_getIdentityCriterionDict
# This patch allows to use workflowmethod as an after_script
# However, the right way of doing would be to have a combined state of TRIGGER_USER_ACTION and TRIGGER_WORKFLOW_METHOD
......
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