[Zope-CMF] Re: Adapterizing CMFCore.WorkflowTool

Laurence Rowe l at lrowe.co.uk
Tue Jan 1 15:55:51 EST 2008


yuppie wrote:
> Laurence Rowe wrote:
>> yuppie wrote:
>> <snip/>
>>>> and adapterizing workflow status and history: 
>>>> http://plone.org/products/roadmap/221
>>>
>>> +1
>>>
>>> I just would prefer named adapters over multi-adapters. And deprecate 
>>> getHistoryOf, setStatusOf and getStatusOf.
>>
>> The problem with using named adapters is that it becomes necessary to 
>> make individual registrations for every workflow id. You could have 
>> all calling code fallback to general interface lookup, but this would 
>> make it pretty much impossible to deprecate getHistoryOf, setStatusOf 
>> and getStatusOf. Perhaps I've missed a better way of handling this?
> 
> Now I see why you didn't propose named adapters. But I'm still not happy 
> with adapting (IContentish, basestring). Did you consider to add getId() 
> to IWorkflowDefinition and to adapt (IContentish, IWorkflowDefinition)?

Then I don't see how you would register adapter for a specific (TTW or 
generic setup defined) workflow.

Perhaps a named adapter lookup falling back to a plain adapter lookup is 
the best solution?

Laurence



More information about the Zope-CMF mailing list