Github user PuspenduBanerjee commented on a diff in the pull request:
https://github.com/apache/nifi/pull/534#discussion_r68350873
--- Diff:
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java
---
@@ -92,11 +92,10 @@
logger.error(message, t);
}
}
- } else {
- // Return defaults for now
- relationships.add(REL_SUCCESS);
- relationships.add(REL_FAILURE);
}
+ // Add defaults
+ relationships.add(REL_SUCCESS);
+ relationships.add(REL_FAILURE);
--- End diff --
As per documentation of
[ExecuteScript](https://github.com/apache/nifi/blob/1bd2cf0d09a7111bcecffd0f473aa71c25a69845/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java),
the script evaluation expects a FlowFile to be returned, in which case it
will route the FlowFile to **success**. If a script error occurs, the original
FlowFile will be routed to **failure**.
So, to comply with that statement I think, it is required to add those
defaults.
Please correct me otherwise.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---