Home > Cloud Cruiser 3 > Batch XML Reference > Filters > FileExistsCondition

FileExistsCondition

Table of contents
No headers

Filter condition that checks for the existence of a particular file by name. The evaluation is case sensitive.

Class

<bean class="com.cloudcruiser.batch.filter.FileExistsCondition">

Properties

<property name="fileName" value="fileName
" />

Specifies that the processor only processes records if the lookup file exists.

Spring Batch Example

This specifies that the CreateIdentifierFromTable processor only processes records if the required lookup file actually exists.

<batch:step id="transform" next="charge">
  <batch:tasklet>
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromTable">
            <property name="filter">
              <bean class="com.cloudcruiser.batch.filter.FileExistsCondition">
                <property name="filename" value="${env.processDir}/host2acct_${env.selectDate}.csv" />
              </bean>
            </property>
            <property name="sourceIdentifier" value="hostname" />
            <property name="targetIdentifier" value="@acctid" />
            <property name="lookupFile" value="${env.processDir}/host2acct_${env.selectDate}.csv" />
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
</batch:step>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP