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

Tres Seaver tseaver at zope.com
Mon Oct 11 09:04:14 EDT 2004


Julien Anguenot wrote:
> Hi Tres,
> 
> Tres Seaver wrote:
> 
>> 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 ?
>>
>>
>>
>> I had already contemplated adding something on a per-instance basis; 
>> making it "placeful" wouldn't be any harder.
>>
>> Tres.
> 
> 
> Where can I see that Tres ? (Draft, implementation  or whatever. )

I had planned to make the 'getChainFor' method of CMFCore.WorkflowTool 
look for a special attribute, '_workflow_chain', and use that 
attribute's value, if found;  otherwise, it would revert to using the 
chain specified on the tool.  Something like:

     def getChainFor(self, ob):

         local = getattr(aq_base(ob), '_workflow_chain', None)

         if local is not None:
             return local
         # Continue with the current implementation here

Note that if we allow that attribute to be acquried, we get 
"placefullness" for free (I had been planning to strip the wrapper 
before checking).

> P.S : Can we continnue the discussion by cross-posting to the cps-devel 
> since I'm not sure all cps devels are reading the plone-devel mailing 
> list ?

I don't mind, except that I am not subscribed there.  Would it be better 
to trim just to 'zope-cmf at zope.org'?

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


More information about the Zope-CMF mailing list