[Zope-CMF] Workflow state change event
Tim Terlegård
tim.terlegard at valentinewebsystems.se
Thu May 15 07:57:49 EDT 2008
I was wondering if it perhaps would make sense to move the
ActionSucceededEvent notification after the reindexing of the
workflow status has been done?
doActionFor(...) calls _invokeWithNotification(...) and the bottom
of that method looks like this:
def _invokeWithNotification(self, wfs, ob, action, func, args, kw):
...
for w in wfs:
w.notifySuccess(ob, action, res)
notify(ActionSucceededEvent(ob, w, action, res))
if reindex:
self._reindexWorkflowVariables(ob)
return res
In an event handler I would like to use the catalog and search for
published
objects, but it's not possible because the catalog is updated after
the event
handler is triggered.
I would like it look like this:
def _invokeWithNotification(self, wfs, ob, action, func, args, kw):
...
if reindex:
self._reindexWorkflowVariables(ob)
for w in wfs:
w.notifySuccess(ob, action, res)
notify(ActionSucceededEvent(ob, w, action, res))
return res
Or do people have use cases where the current logic is better?
/Tim
More information about the Zope-CMF
mailing list