[
https://issues.apache.org/jira/browse/NIFI-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15373443#comment-15373443
]
Joseph Witt commented on NIFI-1152:
-----------------------------------
[~markap14] According to our API docs if a relationship is not registered but
is used in a transfer call it should be an IllegalArgumentException as shown
here:
https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java#L382-L383
But in our implementation it doesn't look like we validate that and thus it
might actually end up being a FlowFileHandlingException.
https://github.com/apache/nifi/blob/470513fa2ec10dbc328b80b8b72f88f1539e523c/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java#L1563
Can you please confirm? If this is true then we need to fix the implementation
to throw IllegalArgumentException and we then need to update mock process
session to behave appropriately as well.
Also, the attached patch and the suggsted PR 534 combines too many things so
should be closed and a new one created scoped to this issue.
> Mock Framework allows processor to route to Relationships that the Processor
> does not support
> ---------------------------------------------------------------------------------------------
>
> Key: NIFI-1152
> URL: https://issues.apache.org/jira/browse/NIFI-1152
> Project: Apache NiFi
> Issue Type: Bug
> Components: Tools and Build
> Affects Versions: 1.0.0, 0.6.0, 0.7.0, 0.6.1
> Reporter: Mark Payne
> Assignee: Puspendu Banerjee
> Labels: beginner, newbie
> Fix For: 1.0.0
>
> Attachments:
> 0001-Fix-for-NIFI-1838-NIFI-1152-Code-modification-for-ty.patch
>
>
> If a processor calls ProcessSession.transfer(flowFile,
> NON_EXISTENT_RELATIONSHIP) the NiFi framework will throw a
> FlowFileHandlingException. However, the Mock Framework simply allows it and
> does not throw any sort of Exception. This needs to be addressed so that the
> Mock framework functions the same way as the normal NiFi framework.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)