Hi,

Sorry if this should turn out to be a dumb question but I could not find any answer in the docu and first support requests: Is it possible to have the Workflow module automatically change my node's state from state "Published" to "Draft" when the user makes a change to the node?

If so, how? If not, is there a module that fills the gap?

Thanks a lot for any help,
Kaspar

Comments

mfredrickson’s picture

Status: Active » Closed (won't fix)

Sorry. This is not currently part of workflow, and I do not know of any modules that provide this service.

I've had similar conversations in the past, and I'd like to support this case, but I can't say when it will happen.

Good luck!

hbfkf’s picture

Mfredrickson, thanks for your answer. I'll try to compile a patch (or module) for this feature. For this, it would be very helpful to know how I can extract, on a node update, the old and new workflow state of the node. Could you, knowing the Workflow code, maybe give me a hint on how to do this?

This would be great for a starting point!
Thanks a lot,
Kaspar

hbfkf’s picture

(To be a little more concrete: My first approach would be to try to find the new workflow state using hook_nodeapi() when it is called with op='update'. But how can I get the old workflow state?)

hbfkf’s picture

For the sake of completeness: Workflow already sends out notifications which is great! See line 478 in workflow.module:

// Notify modules that transition has occurred. Actions should take place       
// in response to this callback, not the previous one.                          
module_invoke_all('workflow', 'transition post', $old_sid, $sid, $node);

A module can use this...

nschindler’s picture

Have you checked into the revision moderation module?
It's here: http://drupal.org/project/revision_moderation