It would be nice to have some actions in workflow_ng implemented by this module for creating nodes.
For example to create a serie of nodes base on a nodetype that functions as a template.

implementation of a function hook for workflow_ng to create an action for creating nodes in a serie.

function node_factory_action_info() {
  return array(
    'add_serie_nodes' => array(
      '#label' => t('Create childnodes based on a serie'),
      '#arguments' => array(
        'serie_node' => array('#entity' => 'node', '#label' => t('Source nodes as templates')),
        'target_nodetype' => array('#entity' => 'node', '#label' => t('Target_nodetype for the new nodes.')),
        'cckfield_serienodeID' => array('#entity' => 'node', '#label' => t('CCKfiled to place the serienodeId in.')),
      ),
      '#module' => t('Node'),
    ),
  );
}

Comments

clemens.tolboom’s picture

This action would produce nodes into a void context. Ie what is the new node title. Or owner?

An elaborated example would help though.

hanno’s picture

- new node title of the target node should be the same as the original one
- owner should be the one who created the node.
In general, we could copy all the values of the node, except of the owner and id

clemens.tolboom’s picture

Thanks for you suggestions.

The title should be "(generated) [node:title]" i guess. Because it should be considered a programmers bug if not properly set.

The owner is the current user who's executing node_factory_create_node();.
- who triggered this workflow?
- how: through a menu click or by creating a content type.

My guess is that this action needs careful designed features. Maybe even a php 'postproces' block if possible.

Regards,
Clemens

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom
Status: Active » Closed (won't fix)

As nobody else joined this discussion I don't think it seems useful.