Using Drupal development to model corporate and business workflows is one of the pleasures of modern computing.
Drupal has incredibly powerful, abstract business workflow tools in the form of the Views and Rules modules/projects. These combine seamlessly with a suite of powerful core modules that we will also make use of, such as Taxonomy and Roles.
This Drupal tutorial looks at how to create a powerful corporate collaborative authoring system without having to resort to writing PHP code.
It’s also important to note that while this example focuses on creating content (something any good CMS can handle), Drupal, along with Views and Rules can be applied to suite a huge range of business requirements for the Internet.
Problem specification, requirements and the proposed Drupal development solution
Let’s assume that a large company is in need of a new website to produce blog and marketing content to support their other operations.
Here’s a list of (fairly commonplace) business requirements for our corporate collaborative authoring and editorial application, to be developed with Drupal:
- Content will be produced by various people, in various parts of the world, at various times
- Content needs to be edited by a specific subject expert editor
- Content is then submitted for approval to the marketing director
- Content should not be available to the public until it has been approved
Requirements and the proposed Drupal development specifications
Traditionally, most companies follow a fairly arcane editorial workflow process like this:
- Writers submit their content (in WORD, PDF, NotePad, etc) to an editor
- Writer and editor then argue and fight until a compromise that benefits no-one is agreed upon
- Content is then emailed to the editor-in-chief who signs off
- Editor-in-chief emails the document to the Web geeks (usually somewhere in the basement), who convert it into HTML and publish it to the site
However, Drupal can drastically improve this workflow by streamlining the procedure.
In order to do so, we will have to make use of the following important modules:
- CCK (Drupal 6) or Fields (Drupal 7)
Proposed Drupal development solution
Using these powerful Drupal modules, we can implement a far superior editorial workflow solution as follows:
- Create “Writer” role that can create, but not publish content to the site
- Create “Editor” role that can edit but not publish content
- Create “Director” role that can edit and publish content
- Create taxonomy aware rules to notify the correct subject editor of new content creation
- Create view block that allow editors to easily access the latest content relevant to them upon login
- Create rule to notify the relevant “Director” upon completion of document editing. Editorial completion is signaled by the editor checking a “Completed edit” CCK or Fields check box
- Create views block that allows the “Director” to easily access edited, but unplublished, content
- Only “Director” may publish content and allow it to go live
Why is this such a huge improvement? For starters, the document stays where it is – on the website, in one safe, secure location. It doesn’t have to get emailed, filtered out in email spam filters, sent to the wrong person, forgotten, corrupted by platform or version changes as it is passed around, and the list goes on.
Implementing the collaborative authoring solution with Drupal
I simply don’t have space to cover all the little bits and pieces that go into making this Drupal solution completely 100% perfect.
Instead, I’ll assume that you have a bit of Drupal experience and can fill in the gaps yourself. If not, you can always contact me to take a look at your Drupal requirements.
You might want to buy one or more of my Drupal books to help you out while you’re at it.
In order to ensure that the “marketing” editor only get shown marketing articles, or the “customer service” editor only gets customer service related content (or whatever), the collaborative content needs to have a vocabulary associated with it.
To keep things simple do not allow multiple term selection (although you could if you wanted to allow content to be edited by multiple editors, etc).
As discussed, we need three roles to be created, “Writer“,
“Editor“, “Director“, or whatever roles are more suited to your business requirements.
Permissions should be set on the specific content type such that only the “Director” can publish content after verifying that it meets company guidelines and standards.
In order for the workflow rules to be implemented, you will have to download and install the Rules module first. Once that is done, you can create the notification rules as follows:
- Writer to editor: After creating a new content piece, test the taxonomy and email a notification to the subject editor(s)
- Editor to director: After updating existing content, test whether the “Completed edit” field is selected and email the relevant director(s).
We need two separate views to show for the editors and directors respectively. The views blocks are as follows:
- Editor block: Displays only for “Editor” role. Displays on editors’ account page. Displays only saved content in the taxonomy relevant to that editor.
- Director block: Displays only for “Director” role. Displays on directors’ account page. Displays all “Completed edit” content that has not been published.
Custom Drupal Collaborative authoring workflow
If you have followed everything so far, congrats, you’ve just implemented a really efficient and powerful solution for corporate editorial workflows.
Bear in mind that I have really stripped things down here. I’m sure that your real world version will need a few additional bits and pieces to be truly useful. For example, you might simply prefer to use “revisions” to keep track of who has done what for any given piece of content.
The image supplied with this post shows you the flow diagram for this solution. You can view the full size image by clicking on the diagram (in the original drupal development tutorial).
Has your company implemented custom workflow solutions to meet your business requirements? How did it go? Are you happy with the solution? Share your horror stories or tales of unimaginable success in the comments, or join the conversation on Twitter or LinkedIn.
I always love to hear about cool projects and development using Drupal. My readers often email in with the solutions they have implemented, and it’s a testament to the flexibility and power of Drupal that I still haven’t seen two solutions exactly alike.