<?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 NiFi - Expression Language - trouble with nested and-/or-conditions in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Expression-Language-trouble-with-nested-and-or/m-p/236660#M198473</link>
    <description>&lt;P&gt;I'am struggling with &lt;STRONG&gt;Expression Language&lt;/STRONG&gt; concerning &lt;STRONG&gt;nested and-/or-conditions&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;In my UpdateAttribute the variable KONTO_IST_AN should be getting the result in boolean which is provided by this expression. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Sample content of RESPONSE (always exactly one element at one time):&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;[{"antauschbis":"20191231","antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result: true

[{"antauschbis":null,"antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;true

[{"antauschbis":"20190531","antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;false

[{"antauschbis":null,"antauschvon":"20200101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;false&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Expression:&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;${RESPONSE:jsonPath('$.[0].id'):equals(${KONTO_BV}):
&amp;nbsp; &amp;nbsp;and(${RESPONSE:jsonPath('$.[0].antauschvon'):le(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and(${RESPONSE:jsonPath('$.[0].antauschbis'):ge(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or(
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ${RESPONSE:jsonPath('$.[0].antauschbis'):isEmpty()})}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)
&amp;nbsp; &amp;nbsp; &amp;nbsp;)
}&lt;/PRE&gt;&lt;P&gt;But there seems to by a syntax error because the attribute KONTO_IST_AN &lt;STRONG&gt;contains after execution of UpdateAttribute the above expression not the expected result&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Checked all square and round brackets and can't finde my error.&lt;/P&gt;&lt;P&gt;Could someone please tell me how to resolve this?&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2019 17:51:50 GMT</pubDate>
    <dc:creator>justenji</dc:creator>
    <dc:date>2019-07-29T17:51:50Z</dc:date>
    <item>
      <title>NiFi - Expression Language - trouble with nested and-/or-conditions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Expression-Language-trouble-with-nested-and-or/m-p/236660#M198473</link>
      <description>&lt;P&gt;I'am struggling with &lt;STRONG&gt;Expression Language&lt;/STRONG&gt; concerning &lt;STRONG&gt;nested and-/or-conditions&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;In my UpdateAttribute the variable KONTO_IST_AN should be getting the result in boolean which is provided by this expression. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Sample content of RESPONSE (always exactly one element at one time):&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;[{"antauschbis":"20191231","antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result: true

[{"antauschbis":null,"antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;true

[{"antauschbis":"20190531","antauschvon":"20190101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;false

[{"antauschbis":null,"antauschvon":"20200101","id":"(422)"}] &amp;nbsp;=&amp;gt; expected result:&amp;nbsp;false&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Expression:&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;${RESPONSE:jsonPath('$.[0].id'):equals(${KONTO_BV}):
&amp;nbsp; &amp;nbsp;and(${RESPONSE:jsonPath('$.[0].antauschvon'):le(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and(${RESPONSE:jsonPath('$.[0].antauschbis'):ge(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or(
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ${RESPONSE:jsonPath('$.[0].antauschbis'):isEmpty()})}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)
&amp;nbsp; &amp;nbsp; &amp;nbsp;)
}&lt;/PRE&gt;&lt;P&gt;But there seems to by a syntax error because the attribute KONTO_IST_AN &lt;STRONG&gt;contains after execution of UpdateAttribute the above expression not the expected result&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Checked all square and round brackets and can't finde my error.&lt;/P&gt;&lt;P&gt;Could someone please tell me how to resolve this?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 17:51:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Expression-Language-trouble-with-nested-and-or/m-p/236660#M198473</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2019-07-29T17:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - Expression Language - trouble with nested and-/or-conditions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Expression-Language-trouble-with-nested-and-or/m-p/236661#M198474</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Got it!&lt;/STRONG&gt; There was one } missing. Thought if the editor shows the expression coloured it would by syntactical correct.&lt;/P&gt;&lt;P&gt;So it has to be:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;${RESPONSE:jsonPath('$.[0].id'):equals(${KONTO_BV}):
&amp;nbsp; and(${RESPONSE:jsonPath('$.[0].antauschvon'):le(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and(${RESPONSE:jsonPath('$.[0].antauschbis'):ge(${now():format("yyyyMMdd")}):
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or(
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ${RESPONSE:jsonPath('$.[0].antauschbis'):isEmpty()})}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;STRONG&gt;}&lt;/STRONG&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;)
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:32:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Expression-Language-trouble-with-nested-and-or/m-p/236661#M198474</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2019-07-29T19:32:55Z</dc:date>
    </item>
  </channel>
</rss>

