The module grabs the state ID for the first state it finds with the given name:
$sid = db_result(db_query("SELECT sid FROM {workflow_states} WHERE state='%s'", $state_name));
If you have multiple workflows, each one assigned to a different set of node types, and each workflow has a "live" state, and you visit content/set_workflow_state/live, then you want the assigned state ID for each node to be the appropriate one for that node type's workflow.
As it is, any stateless node will be given that single $sid, regardless of whether it is appropriate.
I was thinking that you could swap $sid for an array mapping node types to state IDs. I suspect it would work for the majority of users, but it makes a big assumption about what the user wants, so adding an extra argument to the path to specify the workflow itself would probably be the better approach:
content/set_workflow_state/(workflow name)/(state name)
Comments
Comment #1
rdeboerThank you for the suggestion jweowu!
You are right -- the current version assumes that state names are unique.
So until I have time to improve the module, the workaround is to change duplicate workflow state names to unique names (and then potentially change them back after).
Rik
Comment #2
rdeboerComment #3
rdeboerComment #4
Anonymous (not verified) commentedSeems to be an important feature for different content type with a workflow for each.
Comment #5
rdeboerRe #4:
If somebody wants to offer a patch, fine, but I won't be spending time on this. D6 is approaching end of life.
Rik