Is is normal behavior for a node node not to operate if a previous node is sending a payload that is undefined? I my case there is a node that I am using that's output is 'undefined'. I have linked that change node however the change node is not operating properly. Is this normal behavior?
It'll depends on the specific details. Can you share a minimal example?
probably - returning null from a function for example doesn't send a msg.
Also quite a few nodes only trigger if the payload (or selected property) exists.
Yes, sorry struggling with creating a simple example that you can use to recreate. Bottom line, it looks like I don't have a msg object when it is undefined so I change use the standard change, switch nodes etc. I tried to set the payload etc in a function but it still is not working. Is there a way to create a msg object when it is triggered from a node whose output is undefined?
Here is the basic flow I am trying accomplish. When the blob storage account node has successfully saved, it outputs and 'undefined' message. I am unable to do anything after that. I am trying to set a msg.filename property to delete a file but it doesn't work. I believe it is because there isn't a msg object anymore but I can't figure out how to create one and just use the undefined output as a trigger.
[
{
"id": "14b0cdf3.de4eb2",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a3a610f8.41fd6",
"type": "Save Blob",
"z": "14b0cdf3.de4eb2",
"name": "Azure Save Blob Storage",
"x": 353.1000061035156,
"y": 217.20001220703125,
"wires": [
[
"28dda0e9.c0101"
]
]
},
{
"id": "7ebd0394.29648c",
"type": "inject",
"z": "14b0cdf3.de4eb2",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 97.10000610351562,
"y": 181,
"wires": [
[
"a3a610f8.41fd6"
]
]
},
{
"id": "e381cd37.640b5",
"type": "debug",
"z": "14b0cdf3.de4eb2",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 809.1000747680664,
"y": 123.20000648498535,
"wires": []
},
{
"id": "28dda0e9.c0101",
"type": "change",
"z": "14b0cdf3.de4eb2",
"name": "",
"rules": [
{
"t": "set",
"p": "filename",
"pt": "msg",
"to": "filename",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 607.1000366210938,
"y": 171.8000030517578,
"wires": [
[
"e381cd37.640b5",
"e0e2679b.ed0508"
]
]
},
{
"id": "e0e2679b.ed0508",
"type": "file",
"z": "14b0cdf3.de4eb2",
"name": "",
"filename": "",
"appendNewline": true,
"createDir": false,
"overwriteFile": "delete",
"x": 670.1000366210938,
"y": 273.8000183105469,
"wires": [
[]
]
}
]
Ok, I think I figured it out. I needed to create a completely new msg object in a function.