Github user PuspenduBanerjee commented on a diff in the pull request: https://github.com/apache/nifi/pull/534#discussion_r68490863 --- 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 -- Even in original state of `InvokeScriptedProcesor`, the documentation says > SUCCESS and FAILURE are always returned, and if the script processor has defined additional relationships, those will be added as well ``` /** * Returns the valid relationships for this processor. SUCCESS and FAILURE are always returned, and if the script * processor has defined additional relationships, those will be added as well. * * @return a Set of Relationships supported by this processor */ @Override public Set<Relationship> getRelationships() ``` So, ideally those test cases does not require modification, they are there as per contract stated in the java-doc and this piece is valid. I strongly believe we should not break that contract as that may create implication for scripted-processor in production. 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---