Github user PuspenduBanerjee commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/534#discussion_r67446830
  
    --- Diff: 
nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java ---
    @@ -793,13 +798,21 @@ private void validateState(final FlowFile flowFile) {
                 throw new FlowFileHandlingException(flowFile + " is not the 
most recent version of this flow file within this session");
             }
     
    +
             for (final List<MockFlowFile> flowFiles : transferMap.values()) {
                 if (flowFiles.contains(flowFile)) {
                     throw new IllegalStateException(flowFile + " has already 
been transferred");
                 }
             }
         }
     
    +    private void validateDestinationRelation(final Relationship 
relationship) {
    +        if (!relationships.contains(relationship)) {
    +            rollback();
    --- End diff --
    
    I think, though it's for testing purpose , we should emulate as real as we 
can and rollback is the best possible way to revert back to a stable state. 
And, in a real context we may face such issue in case of orchestration, where 
an attribute in a flowfile may finally dictate where it should be transferred.


---
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.
---

Reply via email to