-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 14 Feb 2007, at 15:10, Miles wrote:
I was wondering how - if at all - others have made a workflow react
to deletion of an object. Is there any call for some hook/event
that allows workflows to respond to this event? It seems a bit odd
to me that workflows are carefully notified of creation via
notifyCreated, but can't do anything about deletions.
The standard workflows shipping with CMF simply never cared, no one
had the need. I believe the same is true for the standard Plone
workflows.
I thought of creating a 'delete' workflow action, but that would
cause problems if ever the object were deleted via a different
mechanism (e.g. zmi).
For older CMF versions you'd normally define your own
manage_beforeDelete to do whatever you want it to do just before the
onject is deleted.
In CMF-trunk, the future CMF 2.1, this has been changed to use events
instead. Take a look at CMFCore/events.zcml for how to register an
event handler and CMFCore/CMFCatalogAware.py to see some handlers.
Obviously this is a much better solution since you don't need to
change existing code, you just need to write a handler function and
register it using zcml.
jens
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF0y4CRAx5nvEhZLIRAgOyAJ9t+poUDsWqiib5RTeQEAvgGTvVyQCfaDxg
CFfUEbRjGmZufvpnDSK5Il8=
=yOdI
-END PGP SIGNATURE-
___
Zope-CMF maillist - Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests