Help! I need to get output with delay for each msg.
var msg1 = { payload:"first out of output 1" };
var msg2 = { payload:"second out of output 1" };
var msg3 = { payload:"third out of output 1" };
var msg4 = { payload:"only message from output 2" };
return [ [ msg1, msg2, msg3 ], msg4 ];
Will it work like this . Tried but didn't worked
var msg1 = { payload:"first out of output 1" };
var msg2 = { payload:"second out of output 1" };
var msg3 = { payload:"third out of output 1" };
var msg4 = { payload:"only message from output 2" };
[
[
setTimeout(function(){node.send(msg1);},1000),
setTimeout(function(){node.send(msg2);},2000),
setTimeout(function(){node.send(msg3);},3000)
],
setTimeout(function(){node.send(msg4);},4000)
];
var msg1 = { payload:"first out of output 1" };
var msg2 = { payload:"second out of output 1" };
var msg3 = { payload:"third out of output 1" };
var msg4 = { payload:"only message from output 2" };
setTimeout(function(){node.send([msg1,null]);},1000),
setTimeout(function(){node.send([msg2,null]);},2000),
setTimeout(function(){node.send([msg3,null]);},3000)
setTimeout(function(){node.send([null,msg4]);},4000)
Though to be honest, this kinda misses the point of a visual flow designer and low-code!