IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > FTP > Overview of IBM WebSphere Adapter for FTP > Technical overview > Inbound processing

Splitting files

The inbound event processing mode supports an optional file splitting feature, where the event file is split into several business objects, also known as chunks. Each business object is posted to the export separately. This reduces memory loading during event processing. File splitting is performed based on either a delimiter or on a file size specified in the SplitCriteria property.

The adapter provides SplitBySize and SplitByDelimiter classes for file splitting. Optionally, you can provide a custom file splitter class and use it by providing the class name in the SplittingFunctionClassName property.


Splitting files by size

The splitting size is set in the SplittingFunctionClassName property.

Chunks refer to the resulting files after the file is split. When chunking is enabled, each chunk of the file is posted to the export separately. The number of business objects that are specified in the PollQuantity property is posted to the export.

For example, if the value for PollQuantity is 3, then:

The number of business objects polled is 3.

The number of business objects received by the export is 3.

The adapter does not reassemble chunked data. It provides the information about the chunked data for an external application to merge the chunks. The chunking information is set in the chunkInfo property, which is contained in the business object. This information includes the chunk size in bytes, and the event ID. An example of an event ID is:

AbsolutePathOfTheEventFileNameInLocalEventDirectory_/_yyyy_MM_dd_HH_mm_ss_SSS.
currentBONumber

With WebSphere Adapter for FTP, version 7.5, the event ID does not contain the total business object count, and hence it is not part of the chunk information. Optionally, you can add the total business object count in the chunk information by using the Include total business object count in the ChunkInfo property. See Include total business object count in the ChunkInfo (includeBOCountInChunkInfo).


Splitting files by delimiter

Delimiters are specified values, used for splitting the event files. The delimiter is specified in the SplitCriteria property.

The following rules apply when the delimiter is used:

Example 1:

John Doe,123,Washington Ave,222-123-4567
Jane Smith,234,Washington Ave,222-123-4568

The separator is the end of line character. In this example you would specify \r\n for Windows, \r for Macintosh, and \n for UNIX.

Example 2:

John Doe
123 Washington Ave
222-123-4567
####
Jane Smith
234 Washington Ave
222-123-4568

The separator is ####.

Example 3:

ISAJohnDoe1*IBM************USA************
ISAJohnDoe2*IBM************USA************
ISAJohnDoe3*IBM************USA************

The separator or delimiter in this example is ISA and it is at the beginning of each record.

Inbound processing