Home > Cloud Cruiser 3 > Batch XML Reference > Transform processors > ApplyStateChanges

ApplyStateChanges

Table of contents
No headers

Adds a state identifier based on historical log of state changes. This transform processor will split input records at state changes that occur within the record’s usage time frame and set a " state " identifier value accordingly. This reads state change history from flat file in the following format:

HH:mm:ss,keyValue,identifierValue

Class

<bean class="com.cloudcruiser.batch.transform.ApplyStateChange">

Properties

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

Sets the key identifiers.

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

Sets the target identifier.

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

Sets a default value for the state identifier. This default is assumed when no state change history is found for a record based on key identifier values.

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

Sets the input resource providing state change records in the format of timeStamp , keyValue , identifierValue .

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

Sets the time zone for the state change records so that timestamps are properly converted to the same time zone as usage data. For the syntax of a custom time zone IDs, see See Time zone syntax..

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

Sets the date and time pattern.

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

Sets the encoding.

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

Sets the comment characters.

Spring Batch XML Example

<batch:step id="transform" next="charge">
  <batch:tasklet>
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.ApplyStateChanges">
            <property name="active" value="true" />
            <property name="keyIdentifiers" value="VMName" />
            <property name="targetIdentifier" value="state" />
            <property name="defaultValue" value="started" />
            <property name="stateChangeInput" value="${env.usageDir}/stopstart.log" />
            <property name="stateChangeTimeZone" value="GMT-00:00" />
            <property name="dateTimePattern" value="yyyyMMdd HH:mm:ss" />
            <property name="encoding" value="UTF-8" />
            <property name="commentChars" value="#" />
            <property name="exceptionProcessing" value="true" />
          </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