yuppie a écrit :
yuppie wrote:
notifyBefore, notifySuccess and notifyException seem to be completely useless methods.


Oops! I did look in the wrong places. While these methods are doing nothing in DCWorkflow and the old DefaultWorkflow they are part of the interface expected by the WorkflowTool. So at least in theory third party workflows implement these methods.

I wonder if they are used anywhere and what the use cases are.

FWIW, I raise my hand. ;) CMFNotification [1] is a product which sends notification emails when specific events occur, which includes when a workflow transition is triggered.

To do that, it monkey-patches 'DCWorkflow.notifySuccess()' (among others) to call an appropriate handler (see [2]).

To me, this is the only (and less intrusive) way to be notified when any workflow transition occurs. However, I would be glad to hear about other (cleaner) implementations. Particularly, I know about Zope 3 events model, but there is no event for workflow transitions, is there?

[1] http://plone.org/products/cmfnotification
[2] http://dev.plone.org/collective/browser/CMFNotification/trunk/patches.py


Damien Baty
Pilot Systems - 9, rue Desargues - 75011 Paris
Tél : +33 (0)1 44 53 05 55 - http://www.pilotsystems.net
Free Zope & Plone hosting - http://www.objectis.org
Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to