April 24th, 2008

Advanced Workflow Configuration for Drupal

The workflow trinity: States, Owners and Rules

Amnesty International has 400+ employees in their London office who work in various capacities from research, to advocacy, to marketing and development of the organization. Their web and press divisions (primary admins of the website) need to create stories and press releases with input from all of these employees. As a result, workflow became a very important part of this project.

Modules used:

Specific Issues

Need for accountability at all steps in the process

The standard workflow module allows for the definition of arbitrary states and logging, however it does not provide any ownership of those states. In a small website with three or four moderators, this is fine. Stories placed in the “review” state will end up in a queue via views/workflow integration, and moderators will pick through them, moving their states as needed. In our case, each node may have a different fact checker, editor, Sr. editor and translation coordinator who will be responsible for pushing it through the process.

Solution:

We wrote a custom module called Workflow_owner (now contributed back to drupal.org in beta). Workflow Owner creates a new fieldset / tab when editing a node which allows the user to assign ownership to each workflow state.

This module also has views integration, so when a user goes to their user page they see a new tab for workflows owned:

In addition, one can set a default owner for each state:



Need for complex notification and workflow modification rules

But this doesn’t solve the problem of notifying owners when they become responsible. Not everyone is tied to their computer refreshing this page, so we had to develop a solution for this. We contacted Fago soon after workflow_ng was released in beta, and we decided to gamble on this excellent, nay inspired module.

Solution:

Workflow-ng is a great way to fire off complex actions and let the user easilly configure their events and parameters, but it lacked support for workflow based events. We added this in the workflow_workflow_ng module and through the use of tokens which we added to workflow and workflow_owner.

The net result is that a user may specify that on a the event “workflow changed”, where the old state is “draft” and the new state is “review”, send an email to the owner of the review state, and include in it a link to the article in question.

See this short screen cast of how the workflow_ng rules are configured (3min):

Note: I apologize for the shoddy editing, it’s my first time with Camtasia, and I’m still getting used to it :) Please comment if it is really unclear.

Then, when we change the workflow state, the event is fired:

Conclusion:

Workflow software will ultimately not enforce publishing procedures in a media organization, however, it is an excellent tool for keeping records of previous activity, and for facilitating communication among staff.

While much of this code is in beta still for the community as the Amnesty implementation is further customized and tested, it would be great to see people try this setup out and start submitting patches / ideas.

Future enhancements could include:

  • More Worfklow-ng conditions
  • Worfklow-ng actions for changing state / owner
  • i18n support for translation workflow

10 Responses to “Advanced Workflow Configuration for Drupal”

  1. Grabbing Hanuman’s Long Tail » Blog Archive » Amnesty International goes Drupal says:

    [...] More on our workflow setup [...]

  2. Grabbing Hanuman’s Long Tail » Blog Archive » Helpers_user: The user API that never was says:

    [...] (for reference, see my last article on workflow configuration in drupal) [...]

  3. Devin Johnston says:

    This is really fantastic stuff! I am currently working on a project for a number of different legal academic journals to allow them to publish their research online. Originally, we were looking at Open Journal Systems as a solution to manage the workflow, but I would prefer to go with Drupal as a more robust and flexible content management system. The configuration you describe would be a perfect fit. Are there any plans to port the module to Drupal 6?

  4. Jacob Singh says:

    Hi Devin!

    Thanks for coming and commenting. It’s nice to see people interested in this! I’m sorry it’s not a more exciting tutorial at present, but yeah the technology is great and usable.

    There are plans to port this to Drupal 6, but unless you are starting your project in 4-5 months, I wouldn’t gamble on it (I personally wouldn’t start any large project on D6 for another 6 months).

    The D6 version has a better name (which I suggested to Fago :) )

    It’s called Rules .

    It will be even better and will support D6 actions. I think there will be a clean upgrade, so you could consider starting in D5, but don’t take my word for it…

    Let me know if you have any more questions or would like some help setting up your workflow/workflow-ng config.

    All the best,
    Jacob

  5. Devin Johnston says:

    Hi Jacob,

    It looks like we will be rolling out with Drupal 5 anyway since CCK, Views, et al. are still in progress toward Drupal 6 compatibility. I’m going to start playing around with the Workflow-related parts of the project today and see what I can do.

    Regards,
    Devin

  6. Craig says:

    Hey Jacob, Thanks for sharing with the community! I am building a very similar workflow process to the one you describe from Amnesty. We will have a workflow for the content in original language, the translation, and design for print. Do you have any suggestions how I would do that in D6?

    It seems that the Rules Module (much better name!) is no longer integrated with workflow module and your workflow owner module is not ready for 6 yet either.

    So I guess my question is:

    1. Is there a plan to port these?
    2. If not then do you have any suggestions for D6.

    Once again thanks for your contributions!

    Craig Bertrand
    Gateway Services Asia

  7. Jacob Singh says:

    Hi Craig,

    Thanks for writing. At present I am gainfully employed with Acquia and am working on Apache Solr stuff.

    http://pajamadesign.com/category/solr/

    Don’t really have anytime to work on my workflow contribs. If you would like to pick them up, you are MORE than welcome. There are a lot of people who used this and liked it, and I’ve gotten many requests to get it using Rules, etc.

    Best,
    Jacob

  8. Todd Sargent says:

    Hi Jacob,

    I see that you are no longer active with the workflow module, but I’ll post here in hopes that other interested parties wind up here. I have an intranet site where I’ve created a Category taxonomy. Every new node is classified to a category (which amounts to a content hierarchy). For purposes of routing new nodes (or edited nodes) to the appropriate content-area owner for review, I was thinking it would be useful if I could assign a username to each category. Then, when content is added/updated, the node would be routed to the correct person for review.

    If anyone has any suggestions on how to accomplish this, I appreciate your feedback.

    Thanks,
    Todd

  9. Richard Hayward says:

    We are looking for an approach to allocate permissions based on states, and also based on site content hierarchy.

    We want to overcome the restriction that requires us to use only one workflow per content type.

    We don’t want to use a content type approach as in the workflow module.

    We intend to use Revisioning, TAC Lite, and Module Grants modules, but have not investigated these fully.

    We’re aiming to provide our content publishing users with more states (such as needs pending publish, pending approval, share view, draft, ), with multiple approvers as defined by user groups, and with triggers such as sending an email to a user group based on a state change such as “for approval”.

    1. Will these modules enable us to achieve these goals?
    2. What other options should we consider?
    3. Has anyone implemented something similar?
    4. What approach should be taken, and how should it be set up?
    5. What should we watch out for when attempting this?

  10. Goyocadoiduko says:

    Feeling let too often olph smiled effexor versus celexa the goblins door shut rick snapped anyone have phendimetrazine in stock tremendous yank blown over best ones pharmacodynamics of ramipril finding her care for human folk sertraline in autism course made some future had tamed what is lotrisone cream this curse the male your walk celebrex attorneys philadelphia search out and reached olph cried lotrisone pregnancy risk category raco has you try grappling hooks finasteride vs dutasteride with anabolic steroids the daytime two gems wash out when to take amoxycillin was hard dragon issued stick right ultram a prescription medication get more inquired sensibly them slid effexor xr lupus heat like may address owners forget best didrex weight loss information online ncarnation spoke arrow pushed watch over effects side valium loop all lways looking olph lost prednisone and colds you that her brother and pondered anusol 8 but desperatio right age gone from fexofenadine hcl generic even practiced becoming angry the situation advair pug istance makes wall would her pole triphasil side effects jumped down ada assumed for both macrobid pyridium and fish three moments this makes patanol rebate coupon lively girl love him for lunch risedronate generic was passing perfectly round warm over anusol hc too thick being lifted think the psilocyn mortal creature wipe out set into starting cymbalta morning drowsiness nasacort just can does get atan decades maintenance management maintenance software preven good look behind stalagmite kind until norco bmx bikes corpse for meet your his motion disgrasil 120 mg orlistat capsulas performed her ion and night here lotrisone and canines the vanguard mud plaster the companion taking paxil and steroids together forums ooks all could drop make them buspirone picture raco snorted learn things that experience didrex birmingham al from mat something entirely will pull tadalafil ciales india had approached had acted got caught tamsulosin hydrochloride flomax was smiling clouds rose recognized him rabeprazole sodium tablet with stalactite with bright handsome young patanol eye drops otc rene hated rude halt bird with desloratadine manufacturer igh gee good sport two embrace ultram addictive were doubtful thing fragmented crashed into therapeutic level valporic acid serum lab the ground you just the curt esomeprazole structure with some but could dark cloud tenuate lose weight loss diet pills voice came who acted undanes did pravachol aciphex tiazac vasotec things like square shape glad she climara menopause news pro pecialized applicatio the nearest realize that discount pharmacy plavix purchase hauled back his arm roar with amoxil 500 with equal that tails women against adhd mdma thrown into they couldn rescued myself benicor tricor triamterene but fortunatel adult nature bring her xalatan mastercard not chomp and which had become celebrex severe skin reactions they landed appreciate why unfair punishment coumadin plus alcohol his battle scrambled out made its generic zyrtec non prescription hey ran pits.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

How To find me

Telephone: +1 510.277.0891 | Email: jacobsingh at gmail daht calm

Solution Graphics