Nodes execution status/result, should be an optional condition to determine a workflow direction/path. Example:
Explanation:
Currently, it is possible to configure each node to “Retry on fail” or “Continue on fail”:
It would be GREAT to also have the option inside each node, to “re-route” the workflow if the node fails, without the need of a IF node, or an Error Workflow/Node. Example:
- Current workarounds and problems (for the lack of this feature):
Basically, the issue currently is that we can’t know a specific node execution status (if this has succesfully been executed or failed during execution), unless we add additional nodes to try to detect these errors. But the current workarounds and methods to achieve this adds complexity to the workflows, are inconsistent (as we can’t make sure we catch all the possible errors), or even worse: the corrective action can’t be executed DURING the worklow execution/error detection.
The main issue using an additional IF node to detect/or to detect if a specific node fails, is that 1) adds complexity to the workflow, 2) The condition to determine if the previous node failed it has to be literal. Example of the issue and the workarounds that needs to be made to solve this: IF node following a Failed node - #2 by harshil1712
The other issue using an Error Trigger, is that this doesn’t allow to handle the error or change the workflow steps DURING the execution, based on a node execution success/fail. This error handling method is good for alerts, corrective actions, but only AFTER the workflow has failed and stopped.
- The proposed solution:
The main idea of this feature is to have the additional option (toggle) on the nodes settings, that allows to enable/disable a Error Detection handler (let’s call this feature for now "Execution status output
"). Example:
If disabled (by default): the node has one only output. This is the “normal” nodes output type as it currently works:
If enabled: the node will have 2 outputs (success / error). Each output allow to direct the worklow based on the node execution status.
I hope the idea is clear, please feel free to comment your thoughts.
Thank you in advance!
I was hoping for something similar recently. A corresponding option for some of the node options that would enable a specific output.
E.g. I have a workflow the needs to process 0-X subitems. If after filtering there are 1+ items, we run some more nodes and populate an HTML section, however if there are no items, we still need to continue the workflow just without populating that section.
It means I have to filter (with always output data) → run code node to detect empty output → IF on the empty output
If I had a specific outputs that matched node settings, I could just use the No Items output. Always Output Data → option to output No Items Continue On Fail → option to output Errors separate from successful items
I have a MySQL node that receives, say, 100 items in the preceeding JSON, and then goes through each one to update my database. If one row update fails, it stops all the subsequent rows from updating. I am trying to prevent this.
If I set it to “Continue on Fail” it seems to just jump to the next node after the failure, which I don’t want, as it still hasn’t processed the MySQL row updates that came after the failed one.
If I do “Continue (using error output)” will it move the failed update query and all subsequent ones to the failure output, or will it just move the one that failed to the error output?
In other words, 100 items queued to be processed by a node. Item 2 fails. Will the remaining 98 also go to the error output, or will item 2 go to the error output and items 1 + 3-100 will go through the normal/success output?
Upon further testing, with the MySQL node set to “Continue using error output”, if you get an error like can’t connect to MySQL, it will route to the error output.
But if MySQL gives an error like “ERROR: Out of range value for column ‘price’ at row 1” it appears to stop executing at the query that errored out, does not send that query to the error side of the output, does not attempt to execute further queries that are queued, and everything goes to the “success” side. In other words, it behaves the same as before in terms of stopping at the error, but doesn’t produce any error message to let you know something went wrong.