<?xml version="1.0" ?>
<template encoding-version="1.0">
  <description></description>
  <groupId>d80fe614-b7e0-46bc-b0ec-63bf9355e8ad</groupId>
  <name>Waiting for 5 files before ftping the files</name>
  <snippet>
    <connections>
      <id>822f4cde-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
      <backPressureObjectThreshold>10000</backPressureObjectThreshold>
      <destination>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4cdc-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </destination>
      <flowFileExpiration>0 sec</flowFileExpiration>
      <labelIndex>1</labelIndex>
      <name></name>
      <selectedRelationships>success</selectedRelationships>
      <source>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f38fc-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </source>
      <zIndex>0</zIndex>
    </connections>
    <connections>
      <id>822f4ce8-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
      <backPressureObjectThreshold>10000</backPressureObjectThreshold>
      <destination>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4ce6-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </destination>
      <flowFileExpiration>0 sec</flowFileExpiration>
      <labelIndex>1</labelIndex>
      <name></name>
      <selectedRelationships>success</selectedRelationships>
      <source>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4cdc-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </source>
      <zIndex>0</zIndex>
    </connections>
    <connections>
      <id>822f4cec-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
      <backPressureObjectThreshold>10000</backPressureObjectThreshold>
      <bends>
        <x>455.0</x>
        <y>302.57494769344555</y>
      </bends>
      <bends>
        <x>455.0</x>
        <y>352.57494769344555</y>
      </bends>
      <destination>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4cdc-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </destination>
      <flowFileExpiration>0 sec</flowFileExpiration>
      <labelIndex>1</labelIndex>
      <name></name>
      <selectedRelationships>failure</selectedRelationships>
      <source>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4cdc-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </source>
      <zIndex>0</zIndex>
    </connections>
    <connections>
      <id>5ec53f85-25a9-1ed7-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
      <backPressureObjectThreshold>10000</backPressureObjectThreshold>
      <bends>
        <x>458.6302454080992</x>
        <y>567.5702236559829</y>
      </bends>
      <bends>
        <x>458.6302454080992</x>
        <y>617.5702236559829</y>
      </bends>
      <destination>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4ce6-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </destination>
      <flowFileExpiration>0 sec</flowFileExpiration>
      <labelIndex>1</labelIndex>
      <name></name>
      <selectedRelationships>comms.failure</selectedRelationships>
      <selectedRelationships>not.found</selectedRelationships>
      <selectedRelationships>permission.denied</selectedRelationships>
      <source>
        <groupId>d80fe614-b7e0-46bc-0000-000000000000</groupId>
        <id>822f4ce6-dae8-1d89-0000-000000000000</id>
        <type>PROCESSOR</type>
      </source>
      <zIndex>0</zIndex>
    </connections>
    <processors>
      <id>822f38fc-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <position>
        <x>7.2600454897024065</x>
        <y>0.0</y>
      </position>
      <config>
        <bulletinLevel>INFO</bulletinLevel>
        <comments></comments>
        <concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
        <descriptors>
          <entry>
            <key>Hostname</key>
            <value>
              <name>Hostname</name>
            </value>
          </entry>
          <entry>
            <key>Port</key>
            <value>
              <name>Port</name>
            </value>
          </entry>
          <entry>
            <key>Username</key>
            <value>
              <name>Username</name>
            </value>
          </entry>
          <entry>
            <key>Password</key>
            <value>
              <name>Password</name>
            </value>
          </entry>
          <entry>
            <key>Remote Path</key>
            <value>
              <name>Remote Path</name>
            </value>
          </entry>
          <entry>
            <key>Distributed Cache Service</key>
            <value>
              <identifiesControllerService>org.apache.nifi.distributed.cache.client.DistributedMapCacheClient</identifiesControllerService>
              <name>Distributed Cache Service</name>
            </value>
          </entry>
          <entry>
            <key>Search Recursively</key>
            <value>
              <name>Search Recursively</name>
            </value>
          </entry>
          <entry>
            <key>File Filter Regex</key>
            <value>
              <name>File Filter Regex</name>
            </value>
          </entry>
          <entry>
            <key>Path Filter Regex</key>
            <value>
              <name>Path Filter Regex</name>
            </value>
          </entry>
          <entry>
            <key>Ignore Dotted Files</key>
            <value>
              <name>Ignore Dotted Files</name>
            </value>
          </entry>
          <entry>
            <key>Remote Poll Batch Size</key>
            <value>
              <name>Remote Poll Batch Size</name>
            </value>
          </entry>
          <entry>
            <key>Connection Timeout</key>
            <value>
              <name>Connection Timeout</name>
            </value>
          </entry>
          <entry>
            <key>Data Timeout</key>
            <value>
              <name>Data Timeout</name>
            </value>
          </entry>
          <entry>
            <key>Connection Mode</key>
            <value>
              <name>Connection Mode</name>
            </value>
          </entry>
          <entry>
            <key>Transfer Mode</key>
            <value>
              <name>Transfer Mode</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Type</key>
            <value>
              <name>Proxy Type</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Host</key>
            <value>
              <name>Proxy Host</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Port</key>
            <value>
              <name>Proxy Port</name>
            </value>
          </entry>
          <entry>
            <key>Http Proxy Username</key>
            <value>
              <name>Http Proxy Username</name>
            </value>
          </entry>
          <entry>
            <key>Http Proxy Password</key>
            <value>
              <name>Http Proxy Password</name>
            </value>
          </entry>
        </descriptors>
        <executionNode>PRIMARY</executionNode>
        <lossTolerant>false</lossTolerant>
        <penaltyDuration>30 sec</penaltyDuration>
        <properties>
          <entry>
            <key>Hostname</key>
            <value>nifi-ldap-kdc</value>
          </entry>
          <entry>
            <key>Port</key>
            <value>21</value>
          </entry>
          <entry>
            <key>Username</key>
            <value>ftp</value>
          </entry>
          <entry>
            <key>Password</key>
          </entry>
          <entry>
            <key>Remote Path</key>
            <value>/tmp/rootdir</value>
          </entry>
          <entry>
            <key>Distributed Cache Service</key>
          </entry>
          <entry>
            <key>Search Recursively</key>
            <value>true</value>
          </entry>
          <entry>
            <key>File Filter Regex</key>
            <value>flag.ok</value>
          </entry>
          <entry>
            <key>Path Filter Regex</key>
          </entry>
          <entry>
            <key>Ignore Dotted Files</key>
            <value>true</value>
          </entry>
          <entry>
            <key>Remote Poll Batch Size</key>
            <value>5000</value>
          </entry>
          <entry>
            <key>Connection Timeout</key>
            <value>30 sec</value>
          </entry>
          <entry>
            <key>Data Timeout</key>
            <value>30 sec</value>
          </entry>
          <entry>
            <key>Connection Mode</key>
            <value>Passive</value>
          </entry>
          <entry>
            <key>Transfer Mode</key>
            <value>Binary</value>
          </entry>
          <entry>
            <key>Proxy Type</key>
            <value>DIRECT</value>
          </entry>
          <entry>
            <key>Proxy Host</key>
          </entry>
          <entry>
            <key>Proxy Port</key>
          </entry>
          <entry>
            <key>Http Proxy Username</key>
          </entry>
          <entry>
            <key>Http Proxy Password</key>
          </entry>
        </properties>
        <runDurationMillis>0</runDurationMillis>
        <schedulingPeriod>30 sec</schedulingPeriod>
        <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
        <yieldDuration>1 sec</yieldDuration>
      </config>
      <name>ListFTP</name>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>success</name>
      </relationships>
      <style></style>
      <type>org.apache.nifi.processors.standard.ListFTP</type>
    </processors>
    <processors>
      <id>822f4cdc-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <position>
        <x>0.0</x>
        <y>262.57494769344555</y>
      </position>
      <config>
        <bulletinLevel>INFO</bulletinLevel>
        <comments></comments>
        <concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
        <descriptors>
          <entry>
            <key>Script Engine</key>
            <value>
              <name>Script Engine</name>
            </value>
          </entry>
          <entry>
            <key>Script File</key>
            <value>
              <name>Script File</name>
            </value>
          </entry>
          <entry>
            <key>Script Body</key>
            <value>
              <name>Script Body</name>
            </value>
          </entry>
          <entry>
            <key>Module Directory</key>
            <value>
              <name>Module Directory</name>
            </value>
          </entry>
        </descriptors>
        <executionNode>PRIMARY</executionNode>
        <lossTolerant>false</lossTolerant>
        <penaltyDuration>30 sec</penaltyDuration>
        <properties>
          <entry>
            <key>Script Engine</key>
            <value>Groovy</value>
          </entry>
          <entry>
            <key>Script File</key>
          </entry>
          <entry>
            <key>Script Body</key>
            <value>def flowFiles = session.get(5)
if(!flowFiles || flowFiles.size() &lt; 5) {
  session.rollback()
} else {
  session.transfer(flowFiles, REL_SUCCESS)
}</value>
          </entry>
          <entry>
            <key>Module Directory</key>
          </entry>
        </properties>
        <runDurationMillis>0</runDurationMillis>
        <schedulingPeriod>10 sec</schedulingPeriod>
        <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
        <yieldDuration>1 sec</yieldDuration>
      </config>
      <name>ExecuteScript</name>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>failure</name>
      </relationships>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>success</name>
      </relationships>
      <style></style>
      <type>org.apache.nifi.processors.script.ExecuteScript</type>
    </processors>
    <processors>
      <id>822f4ce6-dae8-1d89-0000-000000000000</id>
      <parentGroupId>d80fe614-b7e0-46bc-0000-000000000000</parentGroupId>
      <position>
        <x>3.6302454080991993</x>
        <y>527.5702236559829</y>
      </position>
      <config>
        <bulletinLevel>INFO</bulletinLevel>
        <comments></comments>
        <concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
        <descriptors>
          <entry>
            <key>Hostname</key>
            <value>
              <name>Hostname</name>
            </value>
          </entry>
          <entry>
            <key>Port</key>
            <value>
              <name>Port</name>
            </value>
          </entry>
          <entry>
            <key>Username</key>
            <value>
              <name>Username</name>
            </value>
          </entry>
          <entry>
            <key>Password</key>
            <value>
              <name>Password</name>
            </value>
          </entry>
          <entry>
            <key>Remote File</key>
            <value>
              <name>Remote File</name>
            </value>
          </entry>
          <entry>
            <key>Completion Strategy</key>
            <value>
              <name>Completion Strategy</name>
            </value>
          </entry>
          <entry>
            <key>Move Destination Directory</key>
            <value>
              <name>Move Destination Directory</name>
            </value>
          </entry>
          <entry>
            <key>Connection Timeout</key>
            <value>
              <name>Connection Timeout</name>
            </value>
          </entry>
          <entry>
            <key>Data Timeout</key>
            <value>
              <name>Data Timeout</name>
            </value>
          </entry>
          <entry>
            <key>Use Compression</key>
            <value>
              <name>Use Compression</name>
            </value>
          </entry>
          <entry>
            <key>Connection Mode</key>
            <value>
              <name>Connection Mode</name>
            </value>
          </entry>
          <entry>
            <key>Transfer Mode</key>
            <value>
              <name>Transfer Mode</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Type</key>
            <value>
              <name>Proxy Type</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Host</key>
            <value>
              <name>Proxy Host</name>
            </value>
          </entry>
          <entry>
            <key>Proxy Port</key>
            <value>
              <name>Proxy Port</name>
            </value>
          </entry>
          <entry>
            <key>Http Proxy Username</key>
            <value>
              <name>Http Proxy Username</name>
            </value>
          </entry>
          <entry>
            <key>Http Proxy Password</key>
            <value>
              <name>Http Proxy Password</name>
            </value>
          </entry>
        </descriptors>
        <executionNode>PRIMARY</executionNode>
        <lossTolerant>false</lossTolerant>
        <penaltyDuration>30 sec</penaltyDuration>
        <properties>
          <entry>
            <key>Hostname</key>
            <value>nifi-ldap-kdc</value>
          </entry>
          <entry>
            <key>Port</key>
            <value>21</value>
          </entry>
          <entry>
            <key>Username</key>
            <value>ftp</value>
          </entry>
          <entry>
            <key>Password</key>
          </entry>
          <entry>
            <key>Remote File</key>
            <value>${path}/${filename}</value>
          </entry>
          <entry>
            <key>Completion Strategy</key>
            <value>None</value>
          </entry>
          <entry>
            <key>Move Destination Directory</key>
          </entry>
          <entry>
            <key>Connection Timeout</key>
            <value>30 sec</value>
          </entry>
          <entry>
            <key>Data Timeout</key>
            <value>30 sec</value>
          </entry>
          <entry>
            <key>Use Compression</key>
            <value>false</value>
          </entry>
          <entry>
            <key>Connection Mode</key>
            <value>Passive</value>
          </entry>
          <entry>
            <key>Transfer Mode</key>
            <value>Binary</value>
          </entry>
          <entry>
            <key>Proxy Type</key>
            <value>DIRECT</value>
          </entry>
          <entry>
            <key>Proxy Host</key>
          </entry>
          <entry>
            <key>Proxy Port</key>
          </entry>
          <entry>
            <key>Http Proxy Username</key>
          </entry>
          <entry>
            <key>Http Proxy Password</key>
          </entry>
        </properties>
        <runDurationMillis>0</runDurationMillis>
        <schedulingPeriod>10 sec</schedulingPeriod>
        <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
        <yieldDuration>1 sec</yieldDuration>
      </config>
      <name>FetchFTP</name>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>comms.failure</name>
      </relationships>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>not.found</name>
      </relationships>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>permission.denied</name>
      </relationships>
      <relationships>
        <autoTerminate>false</autoTerminate>
        <name>success</name>
      </relationships>
      <style></style>
      <type>org.apache.nifi.processors.standard.FetchFTP</type>
    </processors>
  </snippet>
  <timestamp>07/27/2017 22:07:17 BST</timestamp>
</template>