Drupal Newbie Question. Is Workflow really capable to cove a typical publishing cycle?

arnoldc - August 29, 2008 - 17:49

New to the scene and is evaluating Drupal's workflow capability.

I understand Workflow and View modules are what people are using, combined with core Action to trigger events. I try to setup a simple workflow with three states: draft,review and post. A very standard publishing practice.

Here's the shortcoming I found:
1. if editor is editing an existing node in "draft" state, there will be no action since there is no transition to cover in the workflow (draft -> draft). So the editor can bypass the workflow process by setting the node to "Published". Is there a way to hide the "Publishing" options?

2. And Workflow module seems to cover ground for new nodes only. How do one deal with exsiting "Published" nodes? I search the forum and there is no definite answer. Perhap there is a way to clone existing entry to become a new node so one can get around the limitation?

Am I missing some important steps or modules to setup the workflow. Drupal has evolved to version 6 with version 7 in the horizon and yet the Workflow module seems to do only a "half heart" job.

Wonder how the seasoned Drupal developers deal with workflow? Care to shred some lights, anyone?

#1: "publish" is tied to the

WorldFallz - August 29, 2008 - 17:59

#1: "publish" is tied to the "administer nodes" permission. If you need more granular control, search the downloads area for "administer nodes", iirc there's a couple of modules that address this.

#2: I'm not sure what you mean by this-- afaik workflow can handle any nodes, but i haven't tried the d6 version.

There's another workflow module you may wish to look at the adds more functionality: http://drupal.org/project/rules

hope that helps some...

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Thanks, WorldFallz. I'll

arnoldc - August 29, 2008 - 18:13

Thanks, WorldFallz. I'll look into those modules you suggest.

For #2, how do people deal with the nodes once they have been published. An editor may want to create update contents of an existing node but until the revision is approved, the system should continue to use the old contents. Guess I am asking if Drupal has the mechanism to deal with revisioning with workflow.

ah ok, for that i use

WorldFallz - August 29, 2008 - 19:13

ah ok, for that i use http://drupal.org/project/revision_moderation

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Thx to lead up to that

arnoldc - September 2, 2008 - 17:30

Thx to lead up to that module. It is not obvious but I suppose it would work nicely with Workflow?

Actually, I have difficulty to setup Workflow alone as I can't quite figure out the permission settings. It seems I must give "approver" the right to "administer nodes" or this user is not allowed to modify someone's else node (In my case, I just want the approver to access the node and to change the work flow status or modify the content if necessary), despite I set the group to be allowed to "edit any page content". I guess I need to understand more about how permission works in Drupal. Any insight?

It seems unless a user is a node's author. No other users can access it unless given "administer nodes". But by giving this powerful access, approver can view all node options and can bypass the whole concept of workflow such as simply set the node to "published"....

I'm not sure if

WorldFallz - September 2, 2008 - 18:08

I'm not sure if revision_moderation integrates in any way with workflow. It's basically a workflow all it's own (thereby saving you the trouble of manually configuring one of the workflow modules which are much more generic).

If all you need is a draft/review/publish workflow, this can actually be done with core drupal. Simply set the default for the appropriate content types to "unpublished" by default and limit the approvers to the "administer nodes" permission. Adding the views module, which most sites use already anyway, also gives you the nice ability to create various lists of unpublished (aka draft) nodes (i.e authors can have blocks of their own unpublished nodes, approvers can have blocks of nodes waiting for their approval, etc).

For adding revision handling, you can use the revision_moderation module as I mentioned which should take care of your senario without the addition of one of the workflow modules. However, that's a very specific workflow, if you need more generic ones for other purposes you may wish to investigate the workflow modules (though revision moderation may not integrate with them, i'm not aware of any conflicts).

revision_moderation does one specific workflow and it does it very well. If that's what you need then I'd just go with that.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Thanks for the

arnoldc - September 2, 2008 - 21:46

Thanks for the clarification.

Forgive me but I have another "very trivia" question yet I can't find any answer to it.

It seems for any node, only the author or a user with the all-so-powerful "administer nodes" right can edit the node, there is no permission in such gradular-level to deal with "administer nodes".

I try a few modules like Override Node Options, Node Privacy by Role but they all appear require the same old "administer nodes" power for approver to edit someone's else node.

I

anyone with the "edit any

WorldFallz - September 2, 2008 - 23:50

anyone with the "edit any [content-type]" permission (at admin/user/permissions) can edit the node, but I believe the workflow options are tied to "administer nodes".

The only modules I know that try to address this are http://drupal.org/project/publishcontent and http://drupal.org/project/override_node_options (i've not tried it, but you say above it requires administer nodes though the project page says it doesn't).

It's a known issue and iirc there's an issue for it for d7 in the issue queue somewhere.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Here's what I found. I

arnoldc - September 4, 2008 - 00:19

Here's what I found. I don't want to give "approver" the right to "administer nodes" but only the right to edit the content of a node (from any editor) and to change workflow state accordingly. I would have thought to give "edit any page content" right should be sufficient. But instead, the approver will receive "Access denied: You are not authorized to access this page.".

I found he is denied because the node is not published yet. If the node has been set to "published", then the approver can edit the node and subsequently access the workflow tab.

So I don't see the logic behind Workflow module. An approver cannot access an "unpublished" node to access the workflow tab. To access a node in "unpublished" state, I found the only way is by assigning "administer nodes" right. And this mighty power defeats the purpose of workflow. Am I missing some important permission setup?

At the end of the day, I

arnoldc - September 2, 2008 - 21:58

At the end of the day, I want to see the approver has the right to edit someone's else node, have access to edit its node's title, body, the workflow tab to set status, without messing around with other fieldsets like Publishing Options. It seems very standard stuff but it is already quite a challenge for me to see how it can be done in Drupal.

Did you try creating another content type?

__rajeev - September 3, 2008 - 00:12

I am not sure if I fully understand what you want to do. But you want many people to edit some content - even after it is published. I think if you set "edit story content" permissions right, then other people can edit any author's story.

I tried using Workflow module once, but we did not implement it. But if your issue if permissions, then the above may work.

I hope this helps.

I still can't figure out how

arnoldc - September 4, 2008 - 18:44

I still can't figure out how Workflow module may actually work other than using it for simply email notification. Access control in Drupal is so tricky and as far as I see, an user can only access an unpublished node either has to be the node creator or has the "administer nodes" permission. So an approver has in no way to access someone's else "unpublished" node to change the workflow state.

This is a major design flaw yet I don't see anyone has ever brought it up. So I guess majority of people just use Drupal as weblog without approval process.

Perhap a module like "view_unpublished" module may cure the issue on hand. But it only works for Drupal 5, anothe similiar module in Drupal 6?

Google is much more helpful.

arnoldc - September 4, 2008 - 19:00

Google is much more helpful. And hope this will help the others struggling with workflow. I am still disbelieved something so simple yet so hard to do in Drupal.

http://www.dave-cohen.com/node/1732

view_unpublished looks like

WorldFallz - September 4, 2008 - 19:16

view_unpublished looks like it will do what you need. It's a very tiny module and may only need a little massaging to work for d6. A quick way to see what's involved would be to install the coder module and do a quick code review on the module.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

True, I'll explore this tiny

arnoldc - September 4, 2008 - 22:12

True, I'll explore this tiny module to see if I can tackle it to work in D6. Thanks.

Please post if you find a solution

ramper - September 6, 2008 - 02:26

arnoldc, I have exactly the same problem that you have - I am trying to set up a simple workflow for a school newspaper, and I cannot get the 'Editor' role to access the unpublished nodes. It's too bad that such a powerful concept like workflow with such granular access control has to run up against this (perhaps unforeseen?) trivial requirement. I am using D6 as well - so I would like to know if you find a solution, or if any other kind soul could point a way out.

Hi Ramper, I have converted

arnoldc - September 8, 2008 - 20:21

Hi Ramper,

I have converted view_unpublished module to work in D6 and this should work well with Workflow module. Go to here to download my fix. http://drupal.org/node/304173

The module passes code review by Coder except the use of "node_load()". I couldn't figure out how to use "menu_get_object()" as I seem to run into "infinite" loop so I stick with the old method. Perhaps someone can help me out in this area....

Next big thing is how to incorporate workflow with revision, until then....

 
 

Drupal is a registered trademark of Dries Buytaert.