yuppie wrote:
Please note that all other tool handlers use utils.*ConfiguratorBase. I didn't convert workflow.py because it is the biggest handler and it works for me as it is. But it uses deprecated patterns, so if you plan to improve it it might be worth to refactor it using *ConfiguratorBase.

Yes, that's what I intended to do.

- turn import methods in CMFSetup/workflow.py into configurator class
methods so that they're easier to override when subclassing
(_extract*Nodes and _initDCWorkflow* methods)

Sounds fine if you don't want to do the big refactoring.

Yes I'd like to, but as I am new to this code I thought these methods were necessary (is it?) and I just wanted to make them class methods. Maybe it's not the case with ConfiguratorBase, I just have to have a closer look at it.

- get rid of DCWorkflow specifics, and use the workflow factory and
API methods to import a workflow (no need to import
DCWorkflowDefinition, State, Transition classes anymore, for instance)

I didn't have a look at the details. But I'm afraid we would loose some flexibility. Other import handlers allow fine-grained changes to existing setups.

I'm not sure I understand why we could lose some flexibility.
For instance, instead of doing:

from Products.DCWorkflow.States import StateDefinition
s = StateDefinition(id)
workflow.states._setObject(id, s)

I'd like to do:

Since workflows handled are supposed to be quite similar to DCWorkflow workflows, I thought that if it's too different, a new configurator will have to be coded anyway. This is just to handle DCWorkflow subclasses, like CPSWorkflow classes.

- do not list workflows that are not supported when exporting (not
supported workflows are listed but not exported at the moment)

You mean workflows without CMFSetup supported? i.e. CMFDefault DefaultWorkflow? Why shouldn't they be listed?

Currently, on export, if a workflow is not a DCWorkflowDefinition instance, its name is listed in workflows.xml but there is no other file containing the worklow definition, so I'm not sure there is a point to list it.


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to