[Zope] receive a message whenever there is an update in a plone site through a pop-up/mail

Paul Winkler pw_lists at slinkp.com
Mon Mar 14 10:08:44 EST 2005


On Mon, Mar 14, 2005 at 02:46:36PM +0100, Reinoud van Leeuwen wrote:
> On Mon, Mar 14, 2005 at 07:19:36PM +0530, Karthikeyan palani wrote:
> > Hi,
> >      I am developing a content management system based on plone.

You'd do better to take these questions to the plone list:
http://plone.org/contact/
http://lists.sourceforge.net/lists/listinfo/plone-users

> > I have a 
> > requirement which is,
> >     " whenever an update occurs in the plone site ,a message  containing 
> > the place of update should be sent  to all the  members of the site."
> >      I have got two ideas,i don't know whether it works
> >      1>to query the Data.fs and retrieve data( i.e the object which has 
> > been updated) from it  and send it to all the members. 

The phrase "query the Data.fs" suggests to me that you are a bit confused
about basic Zope concepts. See:
http://www.plope.com/Books/2_7Edition/ZopeArchitecture.stx
Understand that you don't interact with the ZODB directly.
Instead, you usually can just forget about persistence, forget
about the ZODB, you just deal with objects arranged in a hierarchy
like a filesystem. For example, a Plone Site is an object. It
contains other objects, like Plone Folders, the Skins Tool,
the Workflow Tool, etc.  You interact with these objects by
calling methods on them.  So, to "query the Data.fs", you need
to figure out what object(s) provide an API that will let you
find the information that you need. 

> >      2>go to ZMI and in the portal_skins/plone_form_scripts/  go to 
> > content_status_modify(handles the workflow transitions of objects)
> >  and  include a code over here such that the objects which have been 
> > updated should be found and a message should be sent to all the members.

Closer, but still not quite right.  Try to avoid putting business logic
in your skins if there's a good alternative.
 
> >  Now,my question is whether if any of the above can be done(i.e is it 
> > possible to query Data.fs while the site is up)  or is there any other 
> > solution for my requirement?If anyone knows an answer to this please  give 
> > me an idea on how to do this and if possible send me a code example.
> 
> A more logical approach might be sending a message from the workflow. 

Agreed, this is a job for workflow. Rather than a "pull" model,
where you query some object for anything that's changed (but
how do you know when to make this query?), your problem calls for a 
"push" model since every content change goes through workflow anyway, 
so you can just add a script to the workflow that gets called at the 
transition you care about. 


-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list