Quick Review of Workbench Moderation 2.x and State Machine 3.x
The main capabilities and changes made to Workbench Moderation 2.x and State Machine 3.x are as follows:
Workbench Moderation’s underlying administrative configuration is now based on CTools. This gives us:
- less code to maintain for the administrative tasks
- export capability
- the foundation for multiple workflows (although we haven’t tested this yet)
State Flow Entity has a new entity called the and history entity.
This entity provides transaction level history of changes to other entities which have revisions. For example, it provides a history of changes to each revision of a particular node.
The History Entity can have fields add to it which allows us to expand meta data stored with each revision change. For example:
- add one or more approval checkboxes e.g. Legal, 508, Editorial
- add a Reviewer field (a user reference field)
- the sky’s the limit! (although the UI is not) ;)
State Flow Entity provides state machine capabilities for any entity.
This gives us:
- the ability to provide workflow for any entity type (this needs more testing)
- the ability to provide a message about why a revision is going from one state to another (event)
Installation and Setup
Starting from a clean install (no base install). Download Workbench Moderation 2.x and State Machine 3.x
1. Enable module: Workbench Moderation
All of the following modules should be enabled after enabling WBM: State Machine, State Flow Entity, State Flow, Workbench Moderation, Workbench Workflows, Chaos Tools, Views
2. Clear Cache
3. Go to Structure -> Workbench Workflows
4. Click Install the default workflow
5. Typically, you want to enable revisions for content that is moderated and that initially the content should not go straight from add to published
Go to Admin -> Structure -> Content Types
For each content type, click edit
- Click the Publishing options vertical tab
- Check the Create new revision box
- Uncheck the Published box
- Click Save content type
If you prefer to learn by watching screencasts, there is a series on the Workbench Suite at ModulesUnraveled.com/workbench.
If you're new to Workbench Moderation and State Machine, you want to know some fundamentals.
Workbench Moderation is comprised of three configurable pieces:
States are the individual states that make up a workflow- approved, requries indexing, etc.
An event is the transition from one state to another. Each event can have multiple origin states meaning that for a piece of content to be in the workflow state of indexing it could come from a ready for indexing state, ready for review (perhaps it failed review), etc. This allows you to configure workflows which are not explicitly linear.
Finally the workflow is a collection of events. Different types of content (issues vs. articles for example) can have different workflows that apply to them.
It is also possible to control which users can move content from one state to another. This is useful for maintaining workflow requriements when a hierarchy of approval is needed. Additionally a state change itself can have information attached to it. For example, a log and assignment fields can be attached to the state change which could trigger outbound emails.