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

Julien Anguenot ja at nuxeo.com
Sun Oct 10 07:10:35 EDT 2004


Hi,

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.
> 

that's correct.

> 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.
> 

You mean a registry of workflow configurations ? If yes +1

> 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_mapp

I don't want to add some complexity on this kind objects since these 
objects don't have much to do appart referencing chains for given 
content_types. In CPS workflows themseves cope with the policy you're 
talking about. See that is just a placeful extension of the global 
configuration within the WorkflowTool.

> Of course, CPS style configuration files can still be supported by Plone.
>

let's take a look at what Tres did.

Regards,

	J.


-- 
Julien Anguenot | Nuxeo (Paris, France)
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66


More information about the Zope-CMF mailing list