Commanding Chaos for Coworking, Open Source and Creative Communities

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