[Zope-CMF] Batch Publishing

Tres Seaver tseaver@zope.com
Mon, 11 Feb 2002 11:37:28 -0500 (EST)


On Tue, 5 Feb 2002, Jeffrey P Shell wrote:

> It's doable, probably relatively easily.  You could use a catalog search
> with a path index, or just do a linear search of a folder (loop over
> objectValues/contentValues for items in an unpublished state), and either
> automatically publish them or generate a form allowing a user to mark which
> items to publish.
>
> After this, one needs a script that can traverse to the marked objects and
> call into the workflow tool to send the 'publish' action for each object.
>
> The ability is there, but you'd just have to implement it yourself.  It can
> all be done at the skins layer, which shows that the appropriate design
> separations are in place - ie, it's not the policy of the default workflow
> definition that any associated objects get "bulk processed" on a state
> change.

  http://cvs.zope.org/CMF/CMFDefault/skins/zpt_generic/review.pt

>
> That last point is good because it means that writing a bulk-publisher is
> relatively easy due to no relationship enforcements.  I have a custom
> workflow definition that requires all subitems that follow this workflow to
> be in an outside state before a parent object can exit, so that a task
> marked as "completed" can't have a subtask that is still marked as "in
> progress".  It's nice having an enforcement like this in the workflow agent
> itself, but it makes doing an action like "cancel this task and all
> incomplete subtasks" little bit trickier than the solution outlined, since I
> have to walk the tree and perform the workflow action from the endpoints
> (sortof like manually doing deletes in a relational database with tight
> referential constraints)
>
> On 2/5/02 2:40 PM, "marc lindahl" <marc@bowery.com> wrote:
>
> > I would love to see that ability!  People have been asking for it (myself
> > included) for my CMFPhotoAlbum product.
> >
> >> From: "Doyon, Jean-Francois" <Jean-Francois.Doyon@CCRS.NRCan.gc.ca>
> >>
> >> Hello,
> >>
> >> Is there a way to "batch publish" things? Like if I want to publish all the
> >> contents of a folder or something ...
> >>
> >> Or do I have to code something to do it? and if so, where would be a good
> >> place to look to start this? I'm NOT familiar with the security features
> >> from an API stand point ...
>
>

-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com