The module now has a beta release. Some functionalities may not have been ported yet. See the relevant issues fot that. Patches are welcome.
D7-version
Status per 1-jan-2015:
The current version of D7.x-2.x, contains the following steps:
- fix all/most open errors (per 1-1-2015) from D7.x-1.x (done)
- re-engineer code into D8-style objects and classes (done) - this should ease the migration to D8, and rationalise the existing code base.
- add support for Fields, by adding the 'Workflow Field' module, splitting old-style code into 'Workflow Node' submodule, and moving obsolete code into a separate include (done)
- add support for multiple Workflow Fields per Entity type (done, with some restrictions)
- incorporate some heavily used 3rd-party modules that were used for version 7.x-1.x in collaboration with the 3rd-marty maintainers, (done)
Release 2.5 is now out, waiting for feedback from the crowd, and to get a workload of new issues/errors.
The current functionality seems to be complete - most feature requests of the last 5 years have been rejected of accepted in the D7-2.x version.
D8-version
Status per 1-nov-2015:
Step 1, convert core-submodules:
- convert workflow_admin_ui (done)
- convert workflow_api (done)
- convert workflow_field (done)
- convert workflow_history_tab (done)
- convert workflow_revert (done)
- remove workflow_node (done)
- remove workflow_search_api: it is included in entity definition
- test hooks
\Drupal::moduleHandler()->invokeAllandalter(done, introducing workflow_devel module) - convert workflow_history_cleanup
- In D7 'Workflow Field', the Workflow settings were moved to the Field settings. That was unnecessary, if not an error. Revert that.
- Implement the Drupal\Core\TypedData\OptionsProviderInterface (which defines a uniform way to show the possible options for a field.)
- Add possibility to make every Field a Workflow field. The OptionsProviderInterface is a great help for this.
Step 2, convert bridge-submodules, in case a stable-enough release exists for partner module:
- convert workflow_access (depending on D7-node_access() )
- convert workflow_notify ("Notify roles of Workflow transitions.")
- convert workflow_actions (todo: rename to workflow_trigger)
- convert workflow_vbo (done, converted into 2 Action plugins; the submodule is removed.)
- convert workflow_rules (depending on https://www.drupal.org/project/rules )
- convert workflow_views (depending on core Views)
- convert workflow.features.inc ?? (depending on https://www.drupal.org/project/features )
- convert workflow.tokens.inc (depending on core and/or https://www.drupal.org/project/token )
Step 3, for each converted submodule:
- remove workflow.deprecated.inc;
- remove text 'deprecated' from files;
- remove checks for: workflow_field, workflow_node, if ($field_name) ; (a field_name now always exist);
- #2354655: [D8-port task] Rename machine_name of workflow_vbo, workflow_actions
For the remaining tasks, a subtask is attached. Volunteers are welcome to post patches.
Comments
Comment #1
johnvComment #2
johnvComment #4
johnvComment #8
johnvComment #15
johnvThe changes are documented https://www.drupal.org/list-changes/published/workflow?keywords_description=&to_branch=8.x.
Comment #22
johnvThe current status so far:
The Workflow UI module is now ported,
except for the 'labels' page. (This is the second list builder for the same ConfigEntityType 'workflow_config_transition'. Any suggestions how to do that? I suppose I should create 2 Form classes, and switch them via the formBuilder() in WorkflowonfigTransitionsListBuilder class.See https://www.drupal.org/node/2188851 )
- #2571697: D8-port: remove 'Permissions page' from Workflow UI.
- #2571093: [D8-port task] The machine_name of WorkflowState needs attention
There are more issues left. See the 'TODO' string in code.
Next step: Implement Workflow Field.
Comment #29
johnvAfter above commit, a rudimentary Workflow Field is functional. You can:
- maintain Workflows with states and transitions (no labels).
- add a Workflow field to your entity type (WorkflowItem).
- change the value of the Workflow state (using the WorkflowDefaultWidget).
Some functionalitiy is lacking:
-
you see always all states in the Widget, not only the permitted states; (here are some problems with D8-api.)- when saving an entity, the state is updated, but no transition is logged or scheduled. (this is the next step.)
- The formatter is yet to be done (using WorkflowDefaultFormatter). The default string-formatter is used.
Comment #32
johnvComment #35
johnvIn case anyone is actively listening to this channel, I will leave this as-is for the next days. So now is the time to test the current situation and give some feedback. Thanks.
Comment #40
johnvComment #41
johnvFor testing purposes, I removed the special permissions for User 1 (enabling him to sue every state transition)
Comment #43
johnvTodo : test the hooks
\Drupal::moduleHandler()->invokeAllandalterComment #45
Maouna commentedI am very interested in a Drupal 8 version of your module. In order to get an overview of it, I tried installing it. Unfortunately that failed because of the missing WorkflowTransitionInterface. In case this module is what I am looking for, I am happy to contribute to its developement. Please let me know, how to get started.
Comment #46
johnv@Maouna , indeed. I forgot to include this file in the last commit. It will be repaired in the next one. Apologies.
Thanks for your interest.
Comment #58
johnvThe Workflow History tab is now added to D8.
Still to do:
- the row theming is lost.
- add the workflow form abovve the list.
- add this page to every entity, not only nodes.
- add Operations column to list (to revert, edit transitions).
Comment #67
johnvThe Workflow History is now converted to D8 for Nodes.
Todo for the History tab:
- add menu items for every Entity Type, not only Nodes.
The next commit allows the Workflow Field to be used on non-Nodes entity types.
Comment #69
eyilmaz\Drupal\workflow\Plugin\Derivative\WorkflowLocalTask
doesn't exists currently. Did you forgot to add it?
Comment #70
johnv@eyilmaz. No, it shouldn't have been there. Fixed it . Thanks.
Comment #73
johnvThis is what is todo for the Workfow UI WorkflowState list:
- enable Operations column + hook_workflow_operations + edit permissions.
- enable De-activate state: status column + reassign + count.
- enable interactive machine_name element.
Comment #79
johnvAbove commit removes the custom 'delete' hooks. You can use the core hook_entity_delete() and hook_entity_predelete() hooks. This is documented in workflow.api.php:
Comment #80
johnvThis commit bcbf7a4 converts the WorkflowTransitionBlock, which used to be part of the workflow_extensions module.
Todo:
- when the block is shown, and a state is scheduled, the form elements are wrapped oddly.
- add to user documentation that the 'formatter' that showed a widget does not exist. If you want to be able to change a state on a Node Page, you need to add this block.
- add to use documentation how to add the block.
- add a configuration, so the block is added immediately upon install??
Comment #101
johnvComment #111
johnvToday I created a beta1 release. Tested agains rc2.
When drupal 8.0.0. is out, I'll test against that version.
Comment #114
johnvA beta2 version is out now. Thanks for your interest.
We still need some volunteers to complete the Token support and Views support. If someone could lend a hand,, ...
Comment #115
johnv