I have the following workflow, where (1) if a content is of type X and (2) user is not role Y then execute action:
array (
'cfg_4' =>
array (
'#active' => 1,
'#label' => 'moderation: product updated',
'#type' => 'configuration',
'#weight' => '0',
'#id' => 1,
'#module' => 'workflow-ng',
'#event' => 'node_update',
'#altered' => false,
0 =>
array (
'#id' => 2,
'#type' => 'condition',
'#label' => 'type == drupal * theme',
'#name' => 'workflow_ng_condition_content_is_type',
'#settings' =>
array (
'type' =>
array (
'product' => 'product',
),
),
'#argument map' =>
array (
'node' => 'node',
),
),
1 =>
array (
'#type' => 'condition',
'#name' => 'workflow_ng_condition_custom_php',
'#settings' =>
array (
'php' => 'return FALSE;',
'used_arguments' =>
array (
),
'used_php_arguments' =>
array (
),
),
'#id' => 3,
),
2 =>
array (
'#type' => 'action',
'#name' => 'workflow_ng_action_node_publish',
'#argument map' =>
array (
'node' => 'node',
),
'#settings' =>
array (
'published' => 0,
),
'#label' => 'unpublish',
),
'#name' => 'cfg_4',
),
)
I'm using custom PHP for the second criteria and currently I'm returning FALSE to figure out whether the action is always executed. Is my PHP wrong, my immediate goal is to stop the action from being executed?
Comments
Comment #1
kulfi commentedReformatted:
Comment #2
kulfi commentedWorking now, must've been user error.