Commit 7727aa4d authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

WorkflowTool.py: convert variable action's expression from gertId to getReference.

parent 9175ca65
...@@ -183,7 +183,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -183,7 +183,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
raise WorkflowException(_(u'Requested workflow definition not found.')) raise WorkflowException(_(u'Requested workflow definition not found.'))
if wf.getPortalType() == 'Workflow': if wf.getPortalType() == 'Workflow':
# workflow compatibility # workflow compatibility
action = 'transition_' + action action = 'transition_' + action_ref
return self._invokeWithNotification( return self._invokeWithNotification(
workflow_list, ob, action, wf.doActionFor, (ob, action) + args, kw) workflow_list, ob, action, wf.doActionFor, (ob, action) + args, kw)
...@@ -485,6 +485,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -485,6 +485,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
variable.setForStatus(vdef.for_status) variable.setForStatus(vdef.for_status)
variable.setInitialValue(vdef.default_value) variable.setInitialValue(vdef.default_value)
variable.setDescription(vdef.description) variable.setDescription(vdef.description)
# for a very specific case, action return the reference of transition
# in order to generation correct workflow history.
if vid == 'action':
variable.setDefaultExpr('transition/getReference|nothing')
return workflow return workflow
def getChainDict(self): def getChainDict(self):
......
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