Commit 58afc35c authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: deploy accessors the come with the new workflows' new features.

parent 29047347
...@@ -344,7 +344,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -344,7 +344,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
workflow_tool = portal.portal_workflow workflow_tool = portal.portal_workflow
result = [] result = []
append = result.append append = result.append
for type_info in portal.portal_types.listTypeInfo(): for type_info in portal.portal_types.objectValues():
portal_type = type_info.id portal_type = type_info.id
if workflow_id in type_info.getTypeWorkflowList(): if workflow_id in type_info.getTypeWorkflowList():
append(portal_type) append(portal_type)
...@@ -357,10 +357,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -357,10 +357,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
return None return None
variable_match_dict = {} variable_match_dict = {}
security_manager = getSecurityManager() security_manager = getSecurityManager()
workflow_id = self.id workflow_id = self.getId()
workflow_title = self.getTitle() workflow_title = self.getTitle()
for worklist_definition in self.objectValues(portal_type='Worklist'): for worklist_id, worklist_definition in self.getWorklistValueList().items():
worklist_id = worklist_definition.getReference()
action_box_name = worklist_definition.getActboxName() action_box_name = worklist_definition.getActboxName()
guard = worklist_definition.getGuard() guard = worklist_definition.getGuard()
if action_box_name: if action_box_name:
...@@ -408,8 +407,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -408,8 +407,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
'worklist_id': worklist_id, 'worklist_id': worklist_id,
'workflow_title': workflow_title, 'workflow_title': workflow_title,
'workflow_id': workflow_id, 'workflow_id': workflow_id,
'action_box_url': worklist_definition.actbox_url, 'action_box_url': worklist_definition.getActboxUrl(),
'action_box_category': worklist_definition.actbox_category} 'action_box_category': worklist_definition.getActboxCategory()}
variable_match_dict[worklist_id] = variable_match variable_match_dict[worklist_id] = variable_match
......
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