[Zope-CMF] workflow probs
seb bacon
seb@jamkit.com
Wed, 4 Jul 2001 20:22:48 +0100
I'm using a recent CMF, and I'm finding workflow-wrapped methods
aren't getting reindexed. The problem appears to be rooted in the
wrapWorkflowMethod function from WorkflowCore pasted below; it only
calls an object 'with notification' if its Workflow has a method
called 'isWorkflowMethodSupported' - and only the DCWorkflow answers
this description currently.
One for the Tracker?
seb
----
security.declarePrivate('wrapWorkflowMethod')
def wrapWorkflowMethod(self, ob, method_id, func, args, kw):
'''
To be invoked only by WorkflowCore.
Allows a workflow definition to wrap a WorkflowMethod.
'''
wf = None
wfs = self.getWorkflowsFor(ob)
if wfs:
for w in wfs:
if (hasattr(w, 'isWorkflowMethodSupported')
and w.isWorkflowMethodSupported(ob, method_id)):
wf = w
break
else:
wfs = ()
if wf is None:
# No workflow wraps this method.
return apply(func, args, kw)
return self._invokeWithNotification(
wfs, ob, method_id, wf.wrapWorkflowMethod,
(ob, method_id, func, args, kw), {})