Last week while sprinting on Workbench I started on an experimental local branch that converted the records in {workbench_moderation_node_history} to entities. As entities, these records can take on fields. These fields could server as log messages for state changes to explain why the state is changing from Needs Review back to Draft. There could be a user reference field to designate which editor should review a node next. There's also a need on some projects for "approval" checkboxes that aren't linear states. For instance a node may need "legal" and "marketing" approval before publishing but these don't follow an order the way Workbench Moderation's states do.

Anyway, I'll clean up this branch and push it to the repository so others can look at it. I'll also emphasize that this code is experiment and unstable.

Comments

stevector’s picture

I cleaned up my branch from last week a bit. There is still much to be improved and much to be done.

git clone --branch 7.x-1.x-1294880-moderation_record_entities-unstable http://git.drupal.org/project/workbench_moderation.git
stevector’s picture

This issue is on adding a hook to alter available transitions.

#1108502: Allow modules to alter the list of possible next states

I think a hook like this would be required to make the "approval" checkboxes work.

matthewv789’s picture

It's great you're working on this, as adding comments (and other use cases such as you mentioned) will be an oft-requested feature. First client we're using Workbench for has already requested status change comments...

stevector’s picture

I just closed a ticket as a duplicate of this one.

#1257650: Internal messages between different states.

stevector’s picture

stevector’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

I'm changing this to 2.x because I expect it to be part of that line of work. The only code written toward this end is still in 7.x-1.x-1294880-moderation_record_entities-unstable

stevector’s picture

Status: Active » Closed (duplicate)

This functionality will come from State Machine under the current working plan for 2.x discussed at http://groups.drupal.org/node/198188

I've made a ticket in State Machine to cover this: #1412728: Make state change records themselves be entities with bundles