Commit 87e989cc authored by wenjie.zheng's avatar wenjie.zheng

WorkflowTool.py: addWorkflowToType function to assign workflow to type for both types of workflow.

parent 6f338837
......@@ -931,6 +931,13 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
trashbin = UnrestrictedMethod(trash_tool.newTrashBin)(dc_wf.id)
trashbin._setOb(dc_wf.id, dc_wf)
def addWorkflowToType(self, type_value, wf_id):
# assign a workflow to a type
if self._getOb(wf_id).__class__.__name__ in ('DCWorkflowDefinition', 'InteractionWorkflowDefinition'):
self.setChainForPortalTypes([type_value.getId()], (wf_id))
else:
type_value.addTypeWorkflowList(wf_id)
InitializeClass(WorkflowTool)
_sql_cast_dict = {
......
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