title: NiFi ifelse expression not working as expected with boolean
body: <p>I am putting JSON values into a Postgres database, chaining InvokeHTTP, CovertJSONtoSQL, ReplaceText and PutSQL. The ReplaceText is adding an additional 'ON CONFLICT...'  clause to my SQL. </p>
  
  <p>As part of the ReplaceText, I'm using one of the sql attributes of the flowfile, which as far as I can tell is being persisted as a boolean (attribute is shown as 't' or 'f' in the flowfile). I need to convert this boolean (t or f) to a string ("TRUE" or "FALSE") in order that it works in my query. My tactic was to try <code>ifelse()</code> as in </p>
  
  <pre><code>${sql.args.3.value:ifElse("TRUE","FALSE")}
  </code></pre>
  
  <p>That always returns "FALSE" even when the attribute value it 't'.</p>
  
  <p>I've made it work by casting it to a string first:</p>
  
  <pre><code>${sql.args.3.value:toString():equals('t'):ifElse("TRUE","FALSE")}
  </code></pre>
  
  <p>but I'm frustrated that it doesn't seem to work as expected. Any ideas?</p>
  
  <p>Thanks!</p>