[Zope-CMF] Re: Adapterizing CMFCore.WorkflowTool

Laurence Rowe l at lrowe.co.uk
Wed Jan 16 05:34:52 EST 2008


yuppie wrote:
> Hi Laurence!
> 
> 
> Laurence Rowe wrote:
>> yuppie wrote:
>>> 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?
> 
> All the solutions you propose to solve this look a bit like a hack to me 
> - I guess because you want to use adapters for something they are not 
> designed for. AFAICT the default pattern for adapting specific objects 
> is to use marker interfaces.
> 
> Why do we need a different solution for workflows?

Because they have names already. At the moment an integrator can easily 
set up workflows through the web and export a generic setup profile. I'd 
like to preserve this way of working.

I'd like to enable the possibility of registering different adapters for 
different workflows, but as far as I know there is no easy way of 
importing/exporting marker interfaces attached to TTW workflows.

However the solution is a bit ugly, so I guess the best way forward is 
making the modifications you suggest. A developer can then register an 
adapter that performs named adapter lookups if s/he so wishes.

I'll create a branch and make the changes.

Laurence



More information about the Zope-CMF mailing list