[Zope-dev] Events in the core

Florent Guillaume fg at nuxeo.com
Mon Dec 13 11:24:58 EST 2004


Dieter Maurer wrote:
> Florent Guillaume wrote at 2004-12-10 19:02 +0100:
> 
>>....
>>The two options we have are quite different:
>>
>>The model in Products/Event and Products/EventListenerTool is geared 
>>toward local definition of listeners and rules for dispatch (if needed, 
>>the tool could easily be divorced from CMF by the way).
>>
>>Zope 3's event model (and the Five backport) is first a global event 
>>service, and global subscribers that may look in context-dependent 
>>places for specific logic to dispatch events.
>>
>>So we have to chose. Jim added a comment in 
>>http://dev.zope.org/Wikis/DevSite/Proposals/IncludeEventsInCore saying 
>>(unsurprisingly) that he'd rather use the Zope 3 event system.
> 
> 
> I fear that we also need to control the order in which subscribers
> are notified:
> 
>   Consider for example the notification about the creation
>   of a object. Both the catalog service and the workflow service need to
>   be notified.
> 
>   If the catalog service is notified first, the workflow service must
>   renotify the catalog service to get the workflow variables indexed.

Well as you know actually in CMF the catalog tool does not index the 
object directly, but a wrapper provided by the workflow tool so that its 
variables are taken into account. So the ordering is taken care of by an 
explicit knowledge of the other tool in the code.

But in theory yes, the problem may exist. I've asked a question about 
how to do that in the zope3-users list.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-Dev mailing list