Hello...
i am trying to implement the following workflow
When a user creates a new content of certain contain type, another content, specificaly a newsletter, is created.

I have select as event "Content has been created"
As condition "Content has type"
and as action "Add ne content"

So far it is working except that i dont know how to set the term id for the newsletter since i have 2-3 kind of those, and the newsletter module is producing an error. As soon as i set the term manualy everything is working.
DO i miss a step? is there something i can do with the arguments (where exaxtly are used)?

I hope yuou can point me to a direction to figure this out

thank for this great module.

Comments

amitaibu’s picture

Component: Wng User interface » Wng Module Integration
Status: Active » Postponed (maintainer needs more info)

I am not familiar with the newsletter module, but it might have a required field that isn't created with the 'create content' action.
If this is the matter, my recommendation is:
* If you are able to then write a custom PHP action.
* Maybe you can review this patch, that allows populating existing fields, so after the node will be saved (probably still with an error), the required fields will be set.

#235438: Populate a field action

krunar’s picture

i dont think its has to do with newsletter...atleast my question isnt.
The problem is how to create a content that belongs to certain taxonomy term...
In the add content action i see a bunch of replacement fields...but how i can use them?

amitaibu’s picture

Create new content doesn't deal with taxonomy.
You currently can't change taconomy with wf_ng action (only PHP action).

krunar’s picture

well, i managed to set the termID and the body by hacking the code
add, to workflow_ng_node.inc

$node->body = workflow_ng_token_replace($settings['body'], $settings['body_args'], $arguments, $log);
$node->taxonomy= array ('tid'=>2);

By hacking the workflow_ng_node_forms.inc i see that you can add additional forms in order to use user input (like i have done for the body).
I am sure that someone with more knowledge in php than me, can make a patch or something for this.

Unfortunately it didnt solve my problem.
The newsletter is created by it doesnt send. I have to go edit it and just click Submit and then it is send.
i think somewhere here i will give up and go make the bloody newsletter manually...but still i believe its a good functionality to add.