[ 
https://issues.apache.org/jira/browse/NIFI-6619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928854#comment-16928854
 ] 

Raymond edited comment on NIFI-6619 at 9/12/19 8:00 PM:
--------------------------------------------------------

Thanks for your reply. I think that for RouteByOrder is a valid use case as 
well. This routing strategy is however one step further from how the current 
processor works. As Joseph says there is now no ordering implied. I've seen 
such routing processors at other integration systems. Those go mostly like:

1) Define the rules

2) Set the order (mostly the user moves rules up and down)

3) The processors start a the top rule and goes down. If a rule is true, the 
processor stops further execution (if none than unmatched)

I think that use case would be better in a separate routing processor to avoid 
confusion.

 

The use case of this ticket is more about that rules for example rule A and 
rule B can both true, but next step expects exactly one message. Now you always 
gets two messages. This can only be avoided with boolean logic of the 
expression language (for simple cases, but not with many rules based on 
multiple attributes) or by making multiple routing steps. New routing strategy 
would make this possible, but probably when a RouteByOrder processor maybe this 
strategy would be less nescesary.

 

 

 

 

 


was (Author: skin27):
Thanks for your reply. I think that for RouteByOrder is a valid use case as 
well. This routing strategy is however one step further from how the current 
processor works. As Joseph says there is now no ordering implied. I've seen 
such routing processors at other integration system. Those go mostly like:

1) Define the rules

2) Set the order (mostly the user moves rules up and down)

3) The processors start a the top rule and goes down. If a rule is true, the 
processor stops further execution (if none than unmatched)

I think that use case would be better in a separate routing processor to avoid 
confusion.

 

The use case of this ticket is more that there rule A and rule B, those rule 
can also both true. Now if you always gets two messages. This can only be 
avoided with boolean logic of the expression language (for simple cases, but 
not with many rules based on multiple attributes) or by making multiple routing 
steps

 

 

 

 

 

> RouteOnAttribute: Create new Routing Strategy to route only first rule that 
> is true
> -----------------------------------------------------------------------------------
>
>                 Key: NIFI-6619
>                 URL: https://issues.apache.org/jira/browse/NIFI-6619
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 1.9.2
>            Reporter: Raymond
>            Priority: Major
>         Attachments: image-2019-09-12-22-15-51-027.png
>
>
> Currently the RouteOnAttribute has the strategy  "Route to Property name". 
> The behavior is that for each rule that is true a message (clone of flowfile) 
> will be sent to the next step. 
> I would like to have another strategy:
> "Route to first matched Property name" or "Route to Property name by first 
> match" or Route to first Property name which evaluates true".
> This will ensure that next step gets exactly one message.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to