Collaboration among workflow modules

Events happening in the community are now at Drupal community events on www.drupal.org.
stevector's picture

Drupal 7 has a couple of similar modules in the workflow space. I'm starting this thread to hold discussion around collaboration among some of those modules.

I work at Palantir.net and am a maintainer of the Workbench Moderation module. I recently reached out to the maintainers of State Machine at Tree House Agency and Sarah Hood, a new maintainer of Workflow to discuss the overlap and potential collaboration points among our modules. Each of these modules have their distinct advantages that include, but are not limited to:

State Machine: A clean object-oriented API foundation which is designed to be extended.
Workbench Moderation: a simple administrative user interface.
Workflow: The ability to define, through the UI, separate Workflows for various content types.

All of these modules have similar database tables that store information like node id and current state. This led me to believe we could combine the strengths of all of these modules in a way that would support upgrade paths from all of their current versions.

Each of these modules has a supported 7.x-1.x branch. Workflow should have a full release soon. The basic plan is to use 2.x branches in these modules explore a new way forward. At Palantir we will first focus on making the functionality in Workbench Moderation dependent on State Machine. This will reduce a lot of duplicate code between the two projects.

Features we want to accommodate include:

  • Exportable workflows.
  • Vary workflows by content type (As Workflow module already does) or by any arbitrary condition like Organic Group or Workbench Access section.
  • Workflows for non-node entities. A site may need a workflow to take a user to the "verified contributor" role. I've also heard may requests for commerce entity workflows.
  • Moderation/state-change records as entities.
    • This allows us to put fields on the moderation record which can solve many use cases. For instance, a user reference field could designate the next person responsible for a piece of content.
    • The state field itself might become a field in the Field API sense.
    • Core list fields could be used to check off non-linear "approval" boxes like "508 compliant" or "iPad tested."
  • CTools access plugins instead of roles to determine whether a user may perform a transition/event.
  • Improved workflows for multilingual content.

What can you do now to help?

Comments

Great to see!

fmitchell's picture

Great to see this coming together. Hopefully we can get something awesome by Drupalcon.

Functionality already exists

rdeboer's picture

Moderation workflows are already possible through Revisioning which features optional Workflow and Rules integrations.
Revisioning has a publication Scheduler built-in. It also has Triggers and Actions and a substantial Views interface with some ready-to-use views.
It has nearly 5000 installs, whereas State Machine has 5. Not saying that you shouldn't start a new project, but for those who want something now that works and has proven to be stable in both 6.x and 7.x, I feel it is worth pointing out.

Revisioning does not cover the new features above

stevector's picture

While Revisioning covers much of the same functionality as the 1.x branches of Workbench Moderation and State Machine, it does not have the CTools access plugin integration, exportability or generic entity support that I mentioned above. I think those features will be best met by combining State Machine's object oriented approach to states and events with CTools exportables for configuration: http://drupal.org/node/1376258

Please let me if I've missed some of Revisioning's functionality that could be leveraged to hit those features. From some testing I did a few months ago, Revisioning's built-in scheduler was super easy to use and I'd like to see this next-generation approach make scheduling just as intuitive.

Publication scheduler just got better

rdeboer's picture

Well you'll be pleased to know that I've just expanded on the scheduler, based on a patch from zepner, so that it now also allows those with the right permissions to specify a publication date on the node edit form, so that content creation, modification and publication scheduling are all done on the same page.
Naturally you can also still use Revisioning's Publish links to enter or alter a publication date afterwards.
Available in 7.x-1.x branch.

Is there any room to

budda's picture

Is there any room to collaborate with the http://drupal.org/project/maestro project. The admin UI is at least impressive from a diagram point of view.

State Machine API

yeha's picture

I quite like the simplicity of this module. I've chosen it (despite low install number) because it's just an API and it does require a lot of development work to get the GUI and everything up to snuff. But it's possible as you have full control.

I like to help out with the integration with Workbench Moderation since that came close second when I was choosing module to manage the content workflow.

Help welcome

stevector's picture

Hi yeha, please comment on any of the Workbench Moderation 2.x issues to help with that integration:
http://drupal.org/project/issues/workbench_moderation?text=&status=Open&...

Are there any shared

yoroy's picture

Are there any shared interests in getting core to provide a better starting point for these modules?
Thinking of things like
http://drupal.org/node/218755 and
http://drupal.org/node/1082292

Making core a bit smarter about this out of box is very much a goal for Drupal 8, without getting in the way of contribs like this. Thoughts?
Thanks!

Dave Reid of Workbench module

R.J. Steinert's picture

Dave Reid of Workbench module expressed interest in this at core talk in London.

Help Drupal CMS

suryakanta101's picture

I am on the process to create a "Complaint Management System" in drupal 7. My work flow is :
Register user will register the Complaint...
It will review by admin ,and he will forward it to "Ex-Dept User " to take action, This level,Ex-Dept user can communicate with other same level user or forward it.
Finally when resolved, Admin can close the issue.
There is essential need of Complaint Tracking code generation.
Please guide me a approch...

Focusing on D7

stevector's picture

Today in #drupal-contribute webchick was asking about node_save() gotchas. I mentioned http://drupal.org/node/1307256 and http://drupal.org/node/1240850.

I'd like to see improvements in core for D8 but that is not my current focus.

Thanks for this post, perfect

schnitzel's picture

Thanks for this post, perfect at the right time :)
Together with Miro (miro_dietiker) I'm organising the i18n Sprint which comes up in two weeks: http://drupalevents.ch/drupal/codesprint-2012
Miro and I already had some discussions about the features of these new modules which will come up during the sprint, and we had exactly these issues:

  • With Nodes and Revisions we can easily track the changes which where made by translators but we are lacking states for these revisions and also assignments to translators (which can be a User or an external Translation Service).
  • We also want translation management for other Entities which don't have a Revisions, like Terms, Commerce Products, etc. So there we also lack the possibility of a storage system for the translation of these entities, before they actually get published.
  • And maybe also translation management for non entities like strings, variables, etc.

So as you can see we have the same requirements as the other workflow modules and of course we would loove to make it as drupalish as possible.

@stevector
So I see you already did some progress in the Workbench Moderation 2.x with StateMachine, are you happy with it? Do you think it is the way to go?
And how is the idea to manage that the state-changes are entities?

I'm asking all these questions, because we have quite some manpower at the sprint (around 120 mandays in a week) and there is definitely some time to get these things flying.

Maybe Miro and also Sascha (Berdir - also one Devs at the sprint) want to tell their thoughts about this approach.

translation++

stevector's picture

Hi Schnitzel,

I'd love it if the work I'm doing and the work of this sprint could be the same thing. Ideally translation workflows would be one of many workflows supported by a more generic framework. That being said, I need to majorly brush up on how translations work currently to verify that's possible.

So far I'm very pleased with using extensions of CTools exportables to define states, events and workflows. I've got an unstable branch in Workbench Moderation that does that now which is publicly available through git. The part that integrates those exportables with state machine is not as functional. I've got a call with Fredric Mitchell and other State Machine maintainers next Tuesday. One of the topics we'll discuss is where to put all of these pieces.

Today in #drupal-contribute I brought up with Earl (merlinofchaos) the idea of CTools exportables for states, events, workflows and he approved of the idea. I don't think he's looked at the code in any detail or at all yet. He also mentioned his ERS project. http://drupal.org/project/ers I haven't tested this yet but it certainly looks promising.

I still think state changes can be entities. I started on that idea here before I did anything with state machine: http://drupal.org/node/1294880 I don't think any of that code will make it through to what is currently being worked on but it shows that the concept of state changes as entities can be implemented.

Codesprint started, core on track

miro_dietiker's picture

Hi Stevector

The codesprint started today. I'm happy about the progress we already have after the early pre-start day of the sprint.
Most architectural decisions have been made and we managed to stay quite far from workflow-kind-of modules with our core.
There's a lot to do and i hope we'll manage to build a solid core and build an extensible solution that allows the whole team of sprinters to parallelize all the work.

Our internal mechanics are entities and we'll have integration to views / rules / vbo and all workflow solutions on a high priority list. However, using such (classic) workflow solutions is to build custom workflows on top of the core functionality we'll develop.

Basing our work on such a futureproof one-workflow-for-all modules would be of pretty high risk and might take a long time to complete. (And so delay the codesprint this week!) Our current solution will allow us to reduce the critical mass for our codesprint goals while there's no primary duplicate work.

Once the workflow unification is a few step further, we're perfectly happy to add further integration code and cleanly interface to this optimum version. Some people possibly still will think in your direction and support your work.

Let's see how the team splits up and how the force finally gets focussed over the next few days.

Thanks for your good work. I'll support your initiative whereever possible.

Sandbox project

stevector's picture

Hi Schnitzel,

I've moved the work I was doing in a Workbench Moderation branch into its own sandbox because it has diverge enough from the Workbench Moderation 1.x model. I hope you have time to look at during the sprint.

chrisstrahl's picture

Interesting timing on this! We're talking about contents staging and the need for better states / workflows over here: http://groups.drupal.org/node/198223

The content staging system I'm envisioning has states managing two separate things: workflow and overall "site context". We're still formulating a plan for attack on how best to implement this, and it's all formative ideas at the moment, but I'd love to see if you have any input as to where this might fit in.

Interesting timing indeed!

stevector's picture

Our original posts were made hours apart. And we just cross-post by 3 minutes: http://groups.drupal.org/node/198223#comment-663628

Are you on IRC at the moment?

Help me a Drupal 7 Requirement

suryakanta101's picture

I am on the process to create a "Complaint Management System" in drupal 7. My work flow is :
Register user will register the Complaint...
It will review by admin ,and he will forward it to "Ex-Dept User " to take action, This level,Ex-Dept user can communicate with other same level user or forward it.
Finally when resolved, Admin can close the issue.
There is essential need of Complaint Tracking code generation.
Please guide me a approch...

By all means, focus on D7,

yoroy's picture

By all means, focus on D7, (and let core dev know what would really help for D8 :-)

Tip: you can cross-post a single node to multiple groups, I'm going to do that with this one.

Workflow

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week