Hi
I have 4.7-beta3 with actions and workflow installed. I create a custom node (A) which has a workflow (WA) associated with it. One of the actions is to create an instance of another type of node (B) which has another
workflow (WB) associated with it.
When WA implements the action to create B:
function action_fhsstadmin_createevaluationentry($op, &$edit, &$node) {
$roles_array = user_roles();
ksort($roles_array);
$roleids_array = array_keys($roles_array);
switch($op) {
case 'metadata':
return array(
'description' => t('Submit for evaluation ...'),
'type' => t('Node'),
'batchable' => false,
'configurable' => true,
);
break;
case 'do':
$edit = new StdClass();
$edit->pageuid = $node->uid;
$edit->pageid = $node->nid;
$edit->title = $node->title." Evaluation";
if ( $node->month && ! $node->generated_date ) {
$edit->created = mktime ( 0, 0, 0, $node->month, $node->day, $node->year);
$edit->changed = $edit->created;
}
node_save($edit);
//workflow_nodeapi($edit,'insert');
break;
case 'form':
break;
}
}
B is created via the node_save call but when I edit B the workflow states don't register - I check that workflow_node database but B isn't registered as being created. I presume that workflow_nodeapi wasn't called. Even if I uncomment the line above: