<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NIFI:Using RouteOnContent for filtering responses? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200346#M68537</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/30155/salometkhilaishvili.html" rel="nofollow noopener noreferrer" target="_blank"&gt;sally sally&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Route on content&lt;/STRONG&gt; is to &lt;STRONG&gt;match the contents of ff&lt;/STRONG&gt; we &lt;STRONG&gt;cannot compare attribute&lt;/STRONG&gt; inside this processor.&lt;/P&gt;&lt;P&gt;But we can acheive by using&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;RouteOnAttribute Processor:-&lt;/STRONG&gt; &lt;/U&gt;&lt;/P&gt;&lt;P&gt;as we are having  &lt;STRONG&gt;${message.body}&lt;/STRONG&gt; as &lt;STRONG&gt;attribute&lt;/STRONG&gt; then add a property &lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;${message.body:contains('&amp;lt;person&amp;gt;')}&lt;/PRE&gt;&lt;P&gt;it will&lt;STRONG&gt; look&lt;/STRONG&gt; for &lt;STRONG&gt;message.body&lt;/STRONG&gt; attribute contains &lt;STRONG&gt;&amp;lt;person&amp;gt;&lt;/STRONG&gt; or not.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40530-routeonattribute-person.png" style="width: 663px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17542i82BEE3EC316F0607/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40530-routeonattribute-person.png" alt="40530-routeonattribute-person.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if yes then it routes to person relation and&lt;/P&gt;&lt;P&gt;if ff not having &amp;lt;person&amp;gt; it will routes to unmatched relation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;RouteOnContent Processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you are having &lt;STRONG&gt;$message.body as attribute&lt;/STRONG&gt; we are&lt;STRONG&gt; not able to use RouteOnContent&lt;/STRONG&gt; processor, because it will &lt;STRONG&gt;look the content of ff &lt;/STRONG&gt;to &lt;STRONG&gt;find&lt;/STRONG&gt; &lt;STRONG&gt;match&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;E.g:-How RouteOnContent works?&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;Input:-&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;note&amp;gt;
  &amp;lt;person&amp;gt;Tove&amp;lt;/to&amp;gt;
  &amp;lt;from&amp;gt;Jani&amp;lt;/from&amp;gt;
  &amp;lt;heading&amp;gt;Reminder&amp;lt;/heading&amp;gt;
  &amp;lt;body&amp;gt;Don't forget me this weekend!&amp;lt;/body&amp;gt;
&amp;lt;/note&amp;gt;&lt;/PRE&gt;&lt;P&gt;If we are having the above input as the ff content then in Route on content processor we need to give property as &lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40531-routecontent.png" style="width: 675px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17543i093457A6B1F159D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40531-routecontent.png" alt="40531-routecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It will look for is the content of ff having &amp;lt;person&amp;gt; or not &lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;our case it is yes&lt;/STRONG&gt; then it will&lt;STRONG&gt; route to person&lt;/STRONG&gt; relation.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 05:43:09 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-08-18T05:43:09Z</dc:date>
    <item>
      <title>NIFI:Using RouteOnContent for filtering responses?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200344#M68535</link>
      <description>&lt;P&gt;I want to use routeonContent and put my response in deifferenct directories based on the method names they consist i have attribute '$message.body' and use expression( in routeonContent) &lt;CODE&gt;${message.body:contains('&amp;lt;person&amp;gt;')}&lt;/CODE&gt; . But it doesn't work for me do you have any better idea how can i do this?&lt;/P&gt;&lt;P&gt;I need to check if it conatains tag with name person and if it does o will route it to certian direction.&lt;/P&gt;&lt;P&gt;I have replaced ${message.body:contains('&amp;lt;person&amp;gt;')} with this ${message.body:contains("&amp;lt;[^&amp;gt;][+ person+^&amp;gt;]*&amp;gt;")} but it still doesn't works. &lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 16:23:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200344#M68535</guid>
      <dc:creator>salome_tkhilais</dc:creator>
      <dc:date>2017-09-25T16:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI:Using RouteOnContent for filtering responses?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200345#M68536</link>
      <description>&lt;P&gt;See my answer to your earlier question. &lt;A href="https://community.hortonworks.com/questions/139227/nifichecking-if-content-contains-xml-tag.html?childToView=138324#answer-138324" target="_blank"&gt;https://community.hortonworks.com/questions/139227/nifichecking-if-content-contains-xml-tag.html?childToView=138324#answer-138324&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 19:17:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200345#M68536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-25T19:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI:Using RouteOnContent for filtering responses?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200346#M68537</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/30155/salometkhilaishvili.html" rel="nofollow noopener noreferrer" target="_blank"&gt;sally sally&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Route on content&lt;/STRONG&gt; is to &lt;STRONG&gt;match the contents of ff&lt;/STRONG&gt; we &lt;STRONG&gt;cannot compare attribute&lt;/STRONG&gt; inside this processor.&lt;/P&gt;&lt;P&gt;But we can acheive by using&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;RouteOnAttribute Processor:-&lt;/STRONG&gt; &lt;/U&gt;&lt;/P&gt;&lt;P&gt;as we are having  &lt;STRONG&gt;${message.body}&lt;/STRONG&gt; as &lt;STRONG&gt;attribute&lt;/STRONG&gt; then add a property &lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;${message.body:contains('&amp;lt;person&amp;gt;')}&lt;/PRE&gt;&lt;P&gt;it will&lt;STRONG&gt; look&lt;/STRONG&gt; for &lt;STRONG&gt;message.body&lt;/STRONG&gt; attribute contains &lt;STRONG&gt;&amp;lt;person&amp;gt;&lt;/STRONG&gt; or not.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40530-routeonattribute-person.png" style="width: 663px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17542i82BEE3EC316F0607/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40530-routeonattribute-person.png" alt="40530-routeonattribute-person.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if yes then it routes to person relation and&lt;/P&gt;&lt;P&gt;if ff not having &amp;lt;person&amp;gt; it will routes to unmatched relation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;RouteOnContent Processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you are having &lt;STRONG&gt;$message.body as attribute&lt;/STRONG&gt; we are&lt;STRONG&gt; not able to use RouteOnContent&lt;/STRONG&gt; processor, because it will &lt;STRONG&gt;look the content of ff &lt;/STRONG&gt;to &lt;STRONG&gt;find&lt;/STRONG&gt; &lt;STRONG&gt;match&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;E.g:-How RouteOnContent works?&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;Input:-&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;note&amp;gt;
  &amp;lt;person&amp;gt;Tove&amp;lt;/to&amp;gt;
  &amp;lt;from&amp;gt;Jani&amp;lt;/from&amp;gt;
  &amp;lt;heading&amp;gt;Reminder&amp;lt;/heading&amp;gt;
  &amp;lt;body&amp;gt;Don't forget me this weekend!&amp;lt;/body&amp;gt;
&amp;lt;/note&amp;gt;&lt;/PRE&gt;&lt;P&gt;If we are having the above input as the ff content then in Route on content processor we need to give property as &lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40531-routecontent.png" style="width: 675px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17543i093457A6B1F159D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40531-routecontent.png" alt="40531-routecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It will look for is the content of ff having &amp;lt;person&amp;gt; or not &lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;our case it is yes&lt;/STRONG&gt; then it will&lt;STRONG&gt; route to person&lt;/STRONG&gt; relation.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:43:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Using-RouteOnContent-for-filtering-responses/m-p/200346#M68537</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T05:43:09Z</dc:date>
    </item>
  </channel>
</rss>

