Commanding Chaos for Coworking, Open Source and Creative Communities

Error message

  • Deprecated function: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in drupal_session_initialize() (line 245 of includes/session.inc).
  • Deprecated function: Creation of dynamic property alpha_theme_container::$delta is deprecated in alpha_theme_container->__construct() (line 25 of sites/all/themes/contrib/omega/alpha/includes/base.inc).

agile approach | Using State Machine with State Flow to build powerful workflows

Thu, 08/09/2012 - 14:56 -- rprice

In this post, I'm going to go over the steps to create your own custom module workflow plugin. For this example let's consider the following to be our requirements:

The Workflow has 5 states - Draft, Needs Review, Approved, Published, Unpublished
There are 5 events or "transitions" - Submit for review, Approve, Request updates, Publish, Unpublish
Only certain roles can approve/publish/unpublish content
Some custom code needs to be executed when the node is moved into the "Approved" state