Commit 2eb06327 authored by wenjie.zheng's avatar wenjie.zheng

WorkflowTool.py: add a separated reassignment function instead of putting this...

WorkflowTool.py: add a separated reassignment function instead of putting this function in conversion function.
parent a02544ec
......@@ -562,7 +562,9 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
self._finalizeWorkflowConversion(dc_workflow)
# override temporary id:
workflow.setId(workflow.default_reference)
workflow_id = workflow.getId()
return workflow
def reassignWorkflow(self, workflow_id):
# type-workflow reassignment
type_workflow_dict = self.getChainsByType()
type_tool = self.getPortalObject().portal_types
......@@ -574,7 +576,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
# 2. assign ERP5 Workflow to portal type:
if workflow_id not in ptype.getTypeWorkflowList():
ptype.addTypeWorkflowList(workflow_id)
return workflow
def getChainDict(self):
chain_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