Commit b192815c authored by Nicolas Dumazet's avatar Nicolas Dumazet

simplify isWorkflowMethodSupported

Correct and update comment: we _do_ use isWorkflowMethodSupported to check the
guard of a transition before running it, check Base.WorkflowMethod implementation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42724 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0199e809
......@@ -174,19 +174,11 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
security.declarePrivate('isWorkflowMethodSupported')
def isWorkflowMethodSupported(self, ob, method_id):
'''
Returns a true value if the given workflow is
automatic with the propper method_id
NOTE: this method is not used in ERP5 because
of transition_list approach
Returns a true value if the given workflow method
is supported in the current state.
'''
tdef = self.interactions.get(method_id, None)
if (tdef is not None and
tdef.trigger_type == TRIGGER_WORKFLOW_METHOD and
self._checkTransitionGuard(tdef, ob)):
return 1
return 0
return tdef is not None and self._checkTransitionGuard(tdef, ob)
security.declarePrivate('wrapWorkflowMethod')
def wrapWorkflowMethod(self, ob, method_id, func, args, kw):
......
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