Support Questions
Find answers, ask questions, and share your expertise

RountOnAttribute Multiple Conditions (Properties)

Explorer

I get two flow files and I need to look at the value of data in flow files based on two different conditions in RouteOnAttribute. If both the conditions match, then only the flow should be routed to executeSQL processor, else it should flow down to MonitorActivity Processor. I tried multiple ways, but this is not working. Every time, when one of the conditions match, it gets routed to executeSQL Processor. 

 

Screen Shot 2021-04-20 at 12.55.32 AM.pngScreen Shot 2021-04-20 at 1.03.42 AM.png

1 REPLY 1

Re: RountOnAttribute Multiple Conditions (Properties)

Master Guru

@ang_coder 

The RouteOnAttribute processor establishes a NEW relationship for each dynamic property you add. If you intent is that a single FlowFile must satisfy all conditions to route on, then you should have just one NiFi Expression Language (NEL) statement that covers all conditions resulting a true or false boolean. 

If you share your two statements, I'd be happy to help you construct a single NEL statement.
butt would be structured something like something like:
MattWho_0-1623159533817.png
All 4 lines would need to result in true before FlowFile would be related to this dynamic property's relationship.

If you found this addressed your query, please take a moment to login and click "Accept" on this solution.
Thank you,

Matt