Hello,
I want to convert all inject nodes in my flow to the function node so that I do not have to inject each node manually. I have tried to implement it but only "addVariable3" is being executed. What could be the problem?
I have shared the flow and a few snaps for reference.
Code in function block replacing all inject nodes -
var addFolder = {
payload: { "opcuaCommand": "addFolder" },
topic: "ns=1;s=PlantSimulation"
};
var addVariable1 = {
payload: { "opcuaCommand": "addVariable" },
topic: "ns=1;s=CreatePart;datatype=Boolean;value= false"
};
var addVariable2 = {
payload: { "opcuaCommand": "addVariable" },
topic: "ns=1;s=EnterStation;datatype=Boolean;value= false"
};
var addVariable3 = {
payload: { "opcuaCommand": "addVariable" },
topic: "ns=1;s=ExitStation;datatype=Boolean;value= false"
};
return addFolder, addVariable1, addVariable2, addVariable3;
server_flow.json (5.1 KB)
