<?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 - Script count fileFlows Groovy in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Script-count-fileFlows-Groovy/m-p/210326#M172268</link>
    <description>&lt;P&gt;session.get() only returns a FlowFile reference (or null if one is not available). Instead you want something like&lt;/P&gt;&lt;PRE&gt;session.get(9)&lt;/PRE&gt;&lt;P&gt;which will return a List&amp;lt;FlowFile&amp;gt; guaranteed not to be null, but it may have size &amp;lt; 9 so your check should work in this case. Having said that, are you sure you want to transfer them to failure? If you're planning on just routing them back to the ExecuteScript (until 9 are available) then you could just do session.rollback() or session.transfer(flowFile, Relationship.SELF)&lt;/P&gt;</description>
    <pubDate>Wed, 10 Oct 2018 22:46:39 GMT</pubDate>
    <dc:creator>mburgess</dc:creator>
    <dc:date>2018-10-10T22:46:39Z</dc:date>
  </channel>
</rss>

