[Zope3-Users] event subscribers

Pete Taylor baldtrol at gmail.com
Tue Oct 4 15:29:39 EDT 2005


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:
<subscriber
for="qarelease.interfaces.IRelease
zope.app.workflow.stateful.interfaces.IAfterTransitionEvent"
factory=".release.notifyTransition"
/>

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20051004/0f13cd83/attachment.htm


More information about the Zope3-users mailing list