I'm considering to start rewriting the workflow module.
You may ask: But why?
- to make programmatically supplying a workflow easier
- to make it more modular and so more extensible
- to allow multiple workflows per content type
- to make it more efficent and to have it cleaned up
So how do I imagine the new improved workflow module?
I am thinking of dividing it into three modules, that can be bundled in one archive/drupal project.
- workflow module (the engine)
- workflow UI
- worklfow permissions
The workflow module would be an API only module. It allows other modules to define workflows and to execute their transitions. It doesn't provide any access checks, as this is needed rarely for programmatically supplied workflows. So this modules task is to make programmatically supplied workflows possible.
The workflow UI module provides the UI (user interface). With this module activated, you get similar functionality as with the current workflow module, so you can also create new workflows or edit programmatically supplied workflows. The workflow module allows other modules to define their workflows to be editable per UI or not.
The workflow permissions module adds the per role permission system like it is existing currently. There is a wrapper function workflow_access() in the workflow module, which invokes this module, if activated. If not, everbody would have access. Perhaps this module can be incorporated with the workflow UI module.
However building it as own module would allow programmatically supplied workflows with configured permissions.
I'm planning to write API workflow module quite soon as I need it for a project. This work will be 4.7 compatible.
Workflow UI and the permissions module will follow later, perhaps they will be initally written for 5.0.
Provide a CCK field for changing workflow states.
I would prefer using strings for identifiers for workflows and their states as it makes programmatically supplied workflows easier to read. Then I would cache the workflow-content-typ map with drupal's variable system to speed up getting this often used information.
The new module will use the old interface to the actions module, so that currently existing actions can be used furthermore.
I'm looking forward on your feedback, suggestions and ideas. Of couse any help is appreciated.. :)