Comparison of workflow modules in Drupal

Creating editorial workflow using content moderation is used to speed up publishing process. Imagine a website have 10 content types hundreds of contents for each content type and daily contents are updated or added by single admin user who has the publish and unpublish permission. So admin user can verify and publish each content one by one and it is time consuming. So publishing process speed will be reduced since one user is creating updating verifying and publishing the content.

Please note below points before implementing content moderation and workflow in Drupal.

we need to have work flow/content moderation only if we have below requirements.

  • There are multiple content authors uploading content on your website, content that needs to be reviewed before it gets published
  • you’re managing a team of multiple admins, with different user roles
  •  each moderator knows his/her role in the publishing chain.

if we have content authors with same role as admin we don’t need to configure workflow/content moderation. In this case publishing process will slow down .

publishing process include a node in draft and reviewed by another or same user and after review approved by another user and then published.

So here one node is going through different states before getting published. We can say below are the states of this node

  • Draft
  • Under review
  • Verify and published

In order to achieve content moderation Drupal 8 has  a core workflow module. Also there are multiple contributor modules which helps to implement workflow and content moderation.

Here we are going to discuss each of these module and difference in how users  moderate contents.

Drupal  Workflow (Core Drupal Module)

First we  are looking to workflows module in Drupal Core . you can see this module in modules list Core modules section.

After installing this module you can see work flows menu under configuration

Configuration->workflow->workflows

For using this workflow module you need to install content moderation core module.

Please note workflows module and content moderation modules always works together. So using content moderation module with workflows we can assign  different states for a node before published state.

After enabling content moderation module a default workflow will be created  called Editorial.

you can access workflows under configuration->workflow->workflows

http://yourproj /admin/config/workflow/workflows

Assign to content type

You can edit and apply changes for each settings in editorial work flow. For example you can add content types/block types  from below section.

Click select button and add content types/or custom block.

 

States and state transitions

In same edit page  you can see states and transition sections

You can add multiple states in states section.

In transition tab you can add transitions.

While adding new transition you can provide a label for each transition, and also you can decide from states to states. See below how a transition add screen looks.

Here you can see , you can select multiple from states for transition. Click save button. So this transition will be listed in your transitions section.

Permissions

in permissions section you can see all transitions of all of your workflows. You can assign permission for roles who is responsible for each  transitions. You can assign multiple transitions for a single role.

make sure permission all set for corresponding roles  for each transition.

You can see details about in below link.

https://www.drupal.org/docs/8/core/modules/content-moderation/overview

while creating content you can select state to which you want to save this content.

While editing you can see current sate. And you can select to which state you want to move.

 

Workflow contributed module

Core Workflows and contributed core Workflow must be similar in their general goal, but provides different widgets, and architecture. This module is little complicated compared to Core workflow. But if you have more than three roles in workflow and also there are lot of work flows and states  this module is the ideal one. You can easily control permission of roles and  can control transitions using a user friendly UI.

download and install workflow contributed module from the community(https://www.drupal.org/project/workflow).

Install all modules under workflow.

You can administer workflow from  Administration > Configuration > Workflow,

URL -/admin/config/workflow

You can see existing workflows. One of the advantage here you can create multiple work flows here and assign those work flows to corresponding content type. here workflows are assigned to content type by creating a workflow field.

By default there will be an Editorial work flow with ID and label.

You can create your own workflow by click on Add workflow

http://localhost/digitalnadeemDrupal1/admin/config/workflow/workflow/add

you can see workflow label and other options.

You can also see options for choosing how do you want to show workflow state in form

Enter values and click save button.

Here I created  a custom workflow names it as custom.

So after creating workflow you have to rebuild permissions.

Next we are going to see how states and transitions are in this module

Click on Edit button of any workflow.You can see multiple tabs with various options. Here we are explaining much needed options.

States and state Transitions

Under states tab you can add multiple states.You can also arrange order of states.

 

You have to select Active check box in order to appear state in workflow.

Under transitions tab you can see a table with column header and row headers state labels and table cells list rolls which have permission to participate in this workflow.

 

For appearing roles in this list you have to enable Editorial: Participate in workflow  Permission.  Editorial is the workflow name.

This table showing possible transitions between states . The state is shown in the left column; the state to be moved to is to the right. You can select roles who can move sates in right side.

For example in below image you can see Author can create a page and move sate to draft. Also only administrator can move from Draft to Published and Draft to Archived

After applying selections hit save configuration button,

Under transition labels you can also provide labels for each transition. You have to select roles in transitions then only you will see all transitions in transition labels. Here I am naming based on from which state to which state content is moved.

This labels will be shown in content add/update form.

Another important thing is access tab. You can specify which role have edit/delete/view permission in each state.

One of the advantage of this module is we can add custom fields under manage fields. It is an advanced option but most of the cases it is not needed.

Assign to content type

Here we will see how we are going to assign a workflow to content type

Select your content type click on add fields.

Select workflow state as new field.

In next screen select your workflow  that to be assigned to this content type.

In field settings you can see allowed values in workflow.

And save . Now you can see Editorial workflow field in your content type.

While creating content you can select to which target state you want to move state of the content. You can also see workflow comment box.

You can move existing node to different in edit page as shown above. Also in view mode you can update state as shown below using transition form. This form is displayed right side of you node.

Permissions

In this module permissions for each role is set in access and transition tabs of work flow. So in Drupals common permission page you can see only participate in workflow permission option. If you enable this, that particular role will be shown in access and transitions tabs of workflow. So while editing any these values in workflow needs rebuild permissions.

Also permissions in workflow access tab will over right edit /delete permission settings configured in Drupal common permissions page.

Workflow Notification

This is  a contributed module and extends  contributed workflow module. This module is used for sending mails while state changes. New tab will appear in admin panel where you can create your mail templates.

Module URL https://www.drupal.org/project/workflow_notifications

 

Workbench modules

relatively simple, preferred if the number of steps and number of workflows are less, provides dashboard.

https://www.drupal.org/project/workbench

install this workbench module first.

Workbench core module needed  for other work bench suite of modules.

Workbench module alone will provide content dashboard with recent edits and content details specific logged in user role. This will make easy for content editors to navigate to each pages like recent edits , my account details..etc

So in order to configure workflow we need to enabled below modules

 

in drupal 8.2x   if you are enabling  content moderation module in core workbench moderation module is not needed.

Workbench  provides authors , editors and publishers unique content dashboard , that make user easly identify contents in different states of workflow.

Workbench module should be enabled in order to work other work bench suite modules.

After enabling work bench module you can see work bench menu in top.

Work bench dashboard provides your recent edits and recent contents.

https://www.drupal.org/project/workbench_access

https://www.drupal.org/project/workbench_moderation

Next enable workbench access and work bench moderation modules.

After enable modules under configuration->workflow you can see below modules.

Here under workbench moderation you can create transition states and transitions.

You can see two options, moderation states and moderate transitions

First create states and then create transitions.

States and transitions

While creating states you can select below options.

So here you can determine  whether content to be published in this state or not.

Also you can select default revision if you need to make this state as default revision.

So you can create multiple number of states .by default  below states will be available.

 

State transitions

Now we are going to see state transitions.

Under workbench moderation click on moderate state transitions.

http://localhost/digitalnadeemDrupal/admin/structure/workbench-moderation/transitions

You can see transition label and from state and to state where of transition.

You can edit existing transition or add new one as shown below.

You can select From and to state of the transition from drop down.

Permissions

You can assign permission for each transition to particular role. Under permissions

http://localhost/digitalnadeemDrupal/admin/people/permissions

go to workbench moderation and select transitions allowed for each role.

You can see all transition labels here .

If you want to allow an entity to be saved without changing its state then you must define a transition from that state to itself.

Enable for content types

While editing content type you can see tab for moderation.

Click check box to enable moderation states. After click on check box you can see more options like as below

You can select moderation sates allowed for this content type .

One important thing you have to notice is compared to other modules here multiple moderation states can be created under published and unpublished state.

There is no specific workflow state for particular content type. You have to select  workflow state needed for particular content type.

While creation of node you can see workflow options in Save button as shown below.

If you want to change workflow state you select options from save button.

Conclusion

We have discussed in detail about all three modules related to workflow/content moderation. Deciding which one you want to use in your project is completely depends on your requirement and complexity of your  website. For example if you need a basic workflow, you can use core workflow module. If you need a more complex workflow with different states for each content type  and there are multiple roles involved in content moderation , then contributed workflow module is more suitable one. Even you can find difference in assigning permissions for each state transition.  contributed workflow module is more user friendly in that case. Also if you consider workbench module there content dashboard is available. Also work bench suite of modules is can be more considered if you have less number of states in your website.

 

Workflow (core module)

 

Workflow contributed Workbench suite modules
Dashboard No No Yes
dependency no no Other modules
Entity to which we can apply Content type and block types Content type Hierarchical permission inheritance by “Sections” not just content types.
Extensible workflow states Yes Yes Yes
Different workflow for content types No Yes No
Permission for each transitions yes. Available in Drupal permissions page yes. Available in transition page of each workflow yes. Available in Drupal permissions page
Notification when state change yes no no
Rebuild permissions not needed Yes needed. not needed
Additional fields options No yes No

 

Get Free E-book
Get a free Ebook on Drupal 8 -theme tutorial
I agree to have my personal information transfered to MailChimp ( more information )

You may also like...