I'm attempting to synchronise the Revisioning and Workflow modules as outlined in this tutorial: http://drupal.org/node/408052. I've run in to an issue which I'm hoping is down to some sort of misconfiguration on my part!

When the workflow state of a node is changed from 'in review' to 'live', I'd like to make the Revisioning module automatically 'publish the most recent pending revision'. However, for each Workflow trigger (e.g. 'Trigger: when Page moves from In Review to Live'), I only have one node action available for selection - 'Change workflow state of post to next state', which I'm assuming is provided by the Workflow module. In fact, the 'publish the most recent pending revision' action is not available for selection by any of the modules that provide triggers. (Screenshot attached.)

Has anyone experienced a similar problem?

Enabled modules:
Trigger
Revisioning 7.x-1.4
Workflow 7.x-1.0
Workflow access 7.x-1.0
Workflow actions and triggers 7.x-1.0
Workflow UI 7.x-1.0
Workflow views 7.x-1.0

CommentFileSizeAuthor
workflow-triggers.png35.04 KBmatt.elkins

Comments

lookatthosemoose’s picture

I have the exact same experience. I'm wondering if it is the configuration of the actions or triggers that need to be changed?

JEmbry’s picture

I have this issue as well.

JEmbry’s picture

Status: Active » Closed (works as designed)

It looks like the correct way of doing this is calling hook_action_info_alter().

Example:

    function module_name_action_info_alter(&$actions) {
      $result = db_query('SELECT tm.type, wt.tid ' .
        'FROM {workflow_type_map} tm ' .
        'LEFT JOIN {workflow_states} ws ON tm.wid = ws.wid ' .
        'LEFT JOIN {workflow_transitions} wt ON ws.sid = wt.sid ' .
        'WHERE ws.status = 1 AND wt.target_sid IS NOT NULL ' .
        'ORDER BY tm.type, ws.weight');
 
      $workflow_triggers = array();
      foreach($result as $data) {
        $workflow_triggers[] = 'workflow-' . $data->type . '-' . $data->tid;
      }
 
      $actions['node_publish_action']['triggers'] = array_merge($actions['node_publish_action']['triggers'], $workflow_triggers);
    }

The query builds out the name of the workflow triggers and adds them to the 'node_publish_action' action. The action is then available to be used by workflows.

gkatsanos’s picture

Status: Closed (works as designed) » Needs review

Uhm, I'm reading this: http://answers.oreilly.com/topic/1549-how-to-setup-a-drupal-publishing-w... and it seems like it's "out of the box" , no calling of a hook is needed.. It also seems to be a recurring problem to users..
ps: actually it seems Trigger is being replaced by Rules which does this and a lot more.. so.. use Rules!

nancydru’s picture

Status: Needs review » Active

There is no patch here to review. It's not even clear to me that there is an issue with Workflow.

matt.elkins’s picture

Status: Active » Closed (won't fix)

@NancyDru, this was only a support request and never confirmed as a bug with either the Workflow or Revisioning modules. If I remember correctly (as it was a while ago now!), I managed to find a workaround for the problem I was having.

Thanks!