[Zope-CMF] Batch Publishing
Jeffrey P Shell
jeffrey@cuemedia.com
Tue, 05 Feb 2002 15:15:50 -0700
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.
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 ...
--
Jeffrey P Shell
www.cuemedia.com