File Upload Widget 2: Does not have a default file set.
The flow variables from both file upload widgets are being merged and exposed in the Component Output.
Problem Description:
When the default file set for File Upload Widget 1 is deleted from my local drive, the workflow completes successfully when I re-execute it — despite the fact that the file referenced in File Upload Widget 1 is no longer available.
My expectation would have been that the widget/component/workflow would throw an error complaining of a nonexistent file.
“Disable output, if file does not exist” is enabled, and seemingly the output is inactive + a warning is shown, but the node doesn’t fail, nor the component.
The node will not “fail” because it is designed to “disable output” which means make the output point inactive instead of failure. I thought you just need the next nodes not being executed.
If you uncheck the “Disable output, if file does not exist”, then it will trigger a failure (red dot).
Apologies for the confusion earlier. Let me clarify the scenario I am trying to achieve:
I am building an interactive workflow where a page (component) includes multiple file upload widgets. Some of these widgets will have a default file path set to help the user by pre-populating the field, while others will not, requiring the user to manually specify the file(s) to be uploaded.
After the user interacts with this page, I would like to provide feedback to ensure that all required files are either correctly selected or available. If any file is missing or undefined, the user should be notified so they can go back and correct the issue before proceeding.
Current Approach & Problem:
My initial thought was that I could catch an error if a file upload widget failed or threw an error due to a missing file (e.g., a missing default file). However, I’ve encountered that the node does not fail when a default file is missing. Instead, it simply does not create the corresponding flow variable for the file. As a result, the workflow doesn’t return an error, making it difficult for me to check for the absence of a file through traditional error-handling methods.
This behavior is a bit unexpected, as I assumed KNIME would either:
Automatically handle missing files (and possibly flag them as errors).
Return an error that I could then capture and handle programmatically.
I appreciate any insights or suggestions you might have on how to achieve the desired outcome!