I have implemented a node-red flow and accessed the flow by exposing it through an API.
API will trigger the Execute node through which the command will execute based on API params.
Once I load the flow using post API to create a flow and deploy it in node-red.
At that time when I am calling the API to execute the exec command.
The exec node is not getting executed and throwing a timeout. it only works once after we edit(just open and redeploy) the exec node and redeploy it.
Any solution or fix for this? so that when i deploy the flow and call the api, Exec node should be running the command and giving results.
when I call get API with params for the 1st time after initial deployment of flow.EXEC node (will generate a file in destination) is not getting executed as expected and it's going to file access node where it will check for the generated output file.
and when the call reaches the file access node it is throwing below error which means the file is not getting generated.
But when we just open the EXEC node and click on done and redeploy it starts working and giving expected output
File C:\Program Files\Connect Transfer\Transformations\Transformed\transformed_input_sample-xml1.xml is not accessible Error: ENOENT: no such file or directory, access 'C:\Program Files\Connect Transfer\Transformations\Transformed\transformed_input_sample-xml1.xml'
Attach a debug node to the output of your function node labeled "sending params" and show us the full output when you "call get API with params for the 1st time after initial deployment". So we can see what, if anything is being sent to the exec node labeled "cmd".
I hope that is not correct as that has never been a supported version of nodejs for node-red. Also everything below v12 is no longer supported (by the nodejs developers or by the current version of node-red) v14 is the one currently recommended for node-red but 12 and 16 are also ok.
In addition, node-red 1.0.6 is very old.
That is not actually a command, we are using a custom one from environment variables. where exec node will execute it.
Both are a little different outputFoldePath -- gives till the folder
outputFilePath -- gives till the name of the output file - to be created.