User login

Copy a worklow-ng workflow to do same actions on create content as update

Workflow-ng has no duplicate functionality at this time, nor can you have it triggered on two or more events (or even edit the event). However, you can export the current set-up (configuration) that you like.

From the export tab: admin/build/workflow-ng/0/export

array (
'cfg_3' =>
array (
'#type' => 'configuration',
'#altered' => false,
'#event' => 'node_update',
'#label' => 'Add an organization',
'#active' => 1,
'#module' => 'workflow-ng',
0 =>
array (
'#type' => 'condition',
'#name' => 'workflow_ng_condition_content_is_type',
'#settings' =>
array (
'type' =>
array (
'organization' => 'organization',
'profile' => 'profile',
),
),
'#label' => 'Content has type Profile or Organization',
'#argument map' =>
array (
'node' => 'node',
),
),
1 =>
array (
'#type' => 'condition',
'#name' => 'workflow_ng_condition_token_numeric',
'#label' => 'Is add org checkbox checked numeric comparison',
'#settings' =>
array (
'operation' => 'greater',
'used arguments1' =>
array (
0 => 'node',
),
'text1' => '[node:field_add_org-raw]',
'used arguments2' =>
array (
),
'text2' => '0',
),
),
2 =>
array (
'#type' => 'action',
'#name' => 'workflow_ng_action_drupal_goto',
'#settings' =>
array (
'path' => 'node/add/organization',
'force' => 1,
'path_args' =>
array (
),
),
),
'#name' => 'cfg_3',
),
)

Make a few key changes:

The current workflow number (cfg_N) in two places, to a higher one than presently exists, the key of the first nested array:

array (
  'cfg_3' =>
  array ( ...

Becomes:

array (
  'cfg_5' =>
  array ( ...

The same for the name:

    '#name' => 'cfg_5',

And then what you actually want to modify in the workflow config. In Agaric's case, the event handler or trigger, changing from node_update to:

    '#event' => 'node_insert',

You may also want to change #label.

Then copy and paste it into the import tab:

admin/build/workflow-ng/0/import

And you should have your copy of your workflow.

Resolution

Searched words: 
workflowng duplicate workflow workflow_ng module

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.