From 726d85babdb949efa8c7bfff538a0287f568b78c Mon Sep 17 00:00:00 2001 From: Wenjie Zheng <wenjie.zheng@tiolive.com> Date: Mon, 4 May 2015 16:48:30 +0000 Subject: [PATCH] patches/WorkflowTool.py: add universe methods for DC workflow. --- product/ERP5Type/patches/WorkflowTool.py | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/product/ERP5Type/patches/WorkflowTool.py b/product/ERP5Type/patches/WorkflowTool.py index 85ad228c3e..7c90f6b5c0 100644 --- a/product/ERP5Type/patches/WorkflowTool.py +++ b/product/ERP5Type/patches/WorkflowTool.py @@ -98,12 +98,42 @@ DCWorkflowDefinition.notifySuccess = DCWorkflowDefinition_notifySuccess def method_getReference(self): return self.id + +def DCWorkflowDefinition_getVariableList(self): + if self.variables is not None: + return self.variables.objectValues() + else: + return None + +def DCWorkflowDefinition_getStateList(self): + if self.states is not None: + return self.states.objectValues() + else: + return None + +def DCWorkflowDefinition_getTransitionList(self): + if self.transitions is not None: + return self.transitions.objectValues() + else: + return None + +def DCWorkflowDefinition_getWorklistList(self): + if self.worklists is not None: + return self.worklists.objectValues() + else: + return None + DCWorkflowDefinition.getReference = method_getReference TransitionDefinition.getReference = method_getReference StateDefinition.getReference = method_getReference VariableDefinition.getReference = method_getReference WorklistDefinition.getReference = method_getReference +DCWorkflowDefinition.getVariableList = DCWorkflowDefinition_getVariableList +DCWorkflowDefinition.getStateList = DCWorkflowDefinition_getStateList +DCWorkflowDefinition.getTransitionList = DCWorkflowDefinition_getTransitionList +DCWorkflowDefinition.getWorklistList = DCWorkflowDefinition_getWorklistList + WORKLIST_METADATA_KEY = 'metadata' SECURITY_PARAMETER_ID = 'local_roles' COUNT_COLUMN_TITLE = 'count' -- 2.30.9