File Accumulator Service (com.ibi.agents.XDFileAccumAgent)

Syntax:

com.ibi.agents.XDFileAccumAgent

iIT Service Object:

accumulation: File Accumulator

emit: File Accumulator

file: File Accumulator

Description:

The file accumulator service adds records to a file for the duration of the local transaction. By storing the output links to the file system, this service is able to achieve a level of high performance when a significant amount of data is being written to the file.

The service can only function in a local transaction situation. For example, the channel is designated as a local transaction channel. The first record to reach the accumulator in the process flow opens the file and prepares for operation. Subsequent entries to the service continue to write to the same file. A common case is either a streaming preparser or an iterator that presents multiple records to the accumulator.

The full path to the file created for the accumulation is available after each execution of this service in the emit.file.accum.filename special register.

Parameters:

Parameter

Description

Source of Data

Determines how the data is located. If this parameter is omitted, the content of the current input document is used.

Target Directory

Directory to which the file is written.

File Pattern

Standard iWay file pattern. If the file exists when the agent begins the operation, the new data is appended to the existing file.

Return

Determines what is placed on the outgoing document. Can be status (status document) or input (input document).

Base64 Decode

If set to true, the incoming value is presumed to be in the Base64 encoding. By default, this parameter is set to false.

Append CRLF

If set to true, a line termination sequence is written after the document.

Call at EOS?

In a streaming environment, EOS (End of Stream) is the short message that is sent after the last document, which signifies the EOS. This parameter determines whether this service should be called for the EOS message.

Edges:

The edges returned are listed in the following table:

Edge

Description

success

The item was added to the file. If the file did not exist, it was created.

fail_operation

Write could not be completed.

fail_parse

The configuration could not be performed. Often this is generated by an invalid iFL statement.

fail_notfound

The file to be written could not be located. This may be a path issue.

The following table lists the available line edges for the File Accumulator Service (com.ibi.agents.XDFileAccumAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_parse: The configuration could not be performed. Often this is generated by an invalid iFL statement.
  • fail_operation: The write could not be completed. This may be a file access issue.
  • fail_notfound: The file to be written could not be located. This may be a path issue