Pete Taylor wrote:
hi all... question for any event subscriber gurus (or just anyone who knows more than me, which probably won't take much ;) )

i have a set of actions that i would like to have trigger off of a particular state in a workflow. in my unittest i can see that the workflow fires the event, but my subscriber doesn't pick up on it. similarly, the subscriber i have in zcml in the application proper does not respond when the workflow transition event is fired. the functionality works if i explicitly call my subscription method against the event, but that only proves that the functionality of the code isn't broken...
the relevant zcml portion is as follows:

the unittest subscribes with ztapi as follows:
ztapi.subscribe((IRelease, IAfterTransitionEvent), None, notifyTransition)

this seems, from both srichter's book and philiKON's book to be the right way to do this (moving from ztapi.handle to ztapi.subscribe since handle is being deprecated).
does anyone have any experience in attempting to do anything like this?

Normallym event subscribers are single-object adapters.  In some cases,
we have subscrobers that redispatch on multiple objects.  For example,
object events have a subscriber that redispatches events based on the
object and event.  You expect something similar to be going on for workflow
events, but I suspect there isn't.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-users mailing list

Reply via email to