[Zope-CMF] Re: [Plone-developers] Re: Pacefull vs Placeless

Jean-Marc Orliaguet jmo at ita.chalmers.se
Sun Oct 10 05:00:04 EDT 2004


Maik Röder wrote:

> Hi Julien!
>
> Julien Anguenot wrote:
>
>> Hi Alex,
>>
>> We have the Placeful workflows within CPS3. It's a fairly easy 
>> implementation actually.
>>
>> http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/CPSWorkflowConfiguration.py?rev=1.10&content-type=text/vnd.viewcvs-markup 
>>
>>
>> + a small hook on the getChainsFor() of the workflow tool.
>>
>> The code can be backported easily to Plone.
>>
>> Maybe it could be interesting to add this within the CMF ?
>
>
> +1
>
> I agree with Limi that it would be great if we could get placeful
> workflows directly in the CMF, so CPS and Plone can use the same 
> infrastructure.
>
> In the getChainsFor method of the workflow tool, the CPS acquires a 
> placeful ".cps_workflow_configuration" file like this:
>
> (In the following code from CPSCore/CPSWorkflowConfiguration.py (see 
> link above), pt is the portal type and getGlobalChainFor is the 
> default CMF implementation, which gets called in case there is no
> local chain which applies)
>
> # Find placeful workflow configuration object.
> wfconf = getattr(container, CPSWorkflowConfig_id, None)
> if wfconf is not None:
>     # Was it here or did we acquire?
>     start_here = hasattr(aq_base(container), CPSWorkflowConfig_id)
>     chain = wfconf.getPlacefulChainFor(pt, start_here=start_here)
> if chain is not None:
>     return chain
> # Nothing placeful found.
>     return self.getGlobalChainFor(pt)
>
> It is up to the workflow configuration to decide which workflow
> chain should be used in this context.
>
> This could be easily integrated in the CMF as Julien points out.
> Also, the code for the configuration file itself 
> (CPSWorkflowConfiguration.py) and the management interfaces
> could be kept in the CMF, but this is not the most important
> part. It is just important to look for a common configuration
> file and call "getPlacefulChainFor" on that. From this moment
> on, CPS and Plone could go into different directions.
>
> In fact, I would propose to work on another kind of configuration
> file for Plone, which does not store the mapping of type to workflow
> directly as is done for the CPS (Link by Jean-Marc Orliaguet):
>
> http://www.medic.chalmers.se/~jmo/CPS/placeful_workflow_cps.png
>
> IMHO, the disadvantage of this approach is that when you have several
> places where you want to have the same mapping, you have to
> reproduce the mapping again and again, which can be error
> prone.
>
> Our proposed configuration file would let you choose a policy
> instead of a whole mapping of content type to workflow chain:
>
> http://plone.org/Members/maikroeder/choose_policy
>
> The list of policies in the placeful workflow tool:
>
> http://plone.org/Members/maikroeder/workflow_policy_mapping
>
> The policy definition in the placeful workflow tool:
>
> http://plone.org/Members/maikroeder/local_workflow_policy_mapping
>
> Of course, CPS style configuration files can still be supported by Plone.
>
> Best regards,
>
> Maik Röder
>
> PS: Here is the link to the PLIP again:
>     "Placeful workflow support for Plone"
>     http://plone.org/Members/maikroeder/plip.2004-10-06.1420962338
>

Hi Maik,

I see what you mean. I think that you are more into the management part 
(setting up policies, mapping policies to folders, ...).

What I usually do to manage CPS local workflows is that I do a copy and 
paste of .cps_workflow_configuration and modify the configuration 
afterwards.

Then you write 'Content types in GroupSpaces follow a special workflow' 
(http://plone.org/Members/maikroeder/workflow_policy_mapping) and this 
is where I believe that there is a misconception:

There are workflows in CPS that describe what can be done with the 
content of workspaces (i.e. GroupSpaces): no need to set up a 
'GroupSpace' policy: the workflow *is* the policy.

These are called:
- 'workspace content workflow' for content object in workspaces,
- 'workspace folder workflow' for folders in workspaces
- 'workspace folderish content' for folderish content (FAQ, Books, ...)  
in workspaces.

I have the impression that what you describe as a 'policy' is the 
workflow itself. If you need a new policy, create a new workflow definition.
http://www.medic.chalmers.se/~jmo/CPS/cps_wf.png

Regards /JM




More information about the Zope-CMF mailing list