Hello All,
Thanks for your guidance and help here, I was able to do it last late night IST, I was able to do it with flow.set and flow.get variable. Where I had get values of chatid, content and type in 1st function before exec and then retrived them back in function after exec successfully. Right now I can't post code since I not on my machine. Will post codes in few hours.
@unixneo Thanks unixneo for letting know another of doing it too.
Appreciate help of zenofmud, Colin, realjax and unixneo here.
EDIT: As promised previously in my reply here are my codes.
function 1st(before using exec):
//console.log("Chat id before:"+msg.payload.chatId);
var ChatID=flow.get('ChatID') // || 0;
//console.log("TYPE test value:"+msg.payload.type)
var TyPE=flow.get('TyPE')
var ConTent=flow.get('ConTent')
flow.set('ChatID',msg.payload.chatId);
flow.set('TyPE',msg.payload.type);
flow.set('ConTent',msg.payload.content);
console.log("Chatid value BEFORE:"+ChatID);
console.log("Type value BEFORE:"+TyPE);
console.log("Content value BEFORE:"+ConTent);
return msg;
2nd function(after exec to retrieve values):
var ChatID=flow.get('ChatID') || 0;
var TyPE=flow.get('TyPE') || 0;
var ConTent=flow.get('ConTent') || 0;
//console.log("AFTERRRRRR id value is:"+ ChatID)
var temp=msg.payload;
msg.payload = {};
msg.payload.chatId=ChatID;
msg.payload.type=TyPE;
msg.payload.content=temp;
console.log("Disk space AFTER chat id here:"+msg.payload.chatId);
console.log("Disk space AFTER type here:"+msg.payload.type);
console.log("Disk space AFTER content of message here:"+msg.payload.content);
return msg;
I am adding it so that it could help future users, cheers and happy learning
Thanks,
R. Singh