Hi All,
I need to start new process when previous nodes finish working (like Post or get request response received)
But I don't want to pass msg data got from previous node.
Regards,
Hi All,
I need to start new process when previous nodes finish working (like Post or get request response received)
But I don't want to pass msg data got from previous node.
Regards,
Add a change node between the two nodes to remove the data you don't want passed on.
or drop a function node in and put...
return {};
.. to return a brand new empty msg
Though I get a feeling that we have misunderstood the question.
Thanks Colin, I have tried Change node. Yes, I can change the payload value whatever I need. But what about the other value under the msg object (Like headers, Status Code, response URL etc). They are passing as it is to the next node and then the other.
Regards,
Nadeem
Oh Great. Thanks you Soo Much. That one worked.
I was thinking that there may be a node to achieve that. But I am getting the object with msgid only atleast.
Thanks a lot.
Regards,
Can the Complete node be useful here?
[{"id":"a3bf9dc0.0c472","type":"complete","z":"9f4fbba4.68ceb8","name":"","scope":["8058430c.31e7b"],"uncaught":false,"x":350,"y":960,"wires":[["1e87e06c.8d018"]]},{"id":"1e87e06c.8d018","type":"debug","z":"9f4fbba4.68ceb8","name":"COMPLETE","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":960,"wires":[]},{"id":"8058430c.31e7b","type":"function","z":"9f4fbba4.68ceb8","name":"test Done","func":"var to = setTimeout(forDone,1000)\nfunction forDone(){\n msg.payload = \"Changed content\"\n node.done()\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":1040,"wires":[["ea250a09.01c238"]]},{"id":"bbdec98d.9320e8","type":"inject","z":"9f4fbba4.68ceb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Message content","payloadType":"str","x":200,"y":1040,"wires":[["8058430c.31e7b"]]},{"id":"ea250a09.01c238","type":"debug","z":"9f4fbba4.68ceb8","name":"FUNCTION","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":1040,"wires":[]}]
Hi,
I have tried complete node. But in my case I am getting few values from the previous POST request which I don't want to pass to the next node. I just need to trigger the next process when first process become completed.
Like Send post API get response, Display values on Dashboard UI
Then start new API request in sequence.
for reference, there is usually no real need to delete the msg contents (or create a new mesage) - you just ignore the extra bits in the msg. In fact, for debugging and performance (sometimes) purposes or downstream operations, it is quite desirable to leave the msg as-is.
Hi Steve,
I got your point. But in my case if sequence of API creates many bits in response and transfer it to the next node, It will be difficult with me to debug, Like which node produce which bits.
Also is there any way to keep only msg.payload and ignore all extra bits? Or just use previous msg to trigger new sequence and pass only a new payload (which will defined by function itself) using function node instead of brand new empty msg
Thanks
Yes...
return { payload: msg.payload }; //new object with payload from original msg
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.