The batch processor application is not dependent on any
specific batch input or output source or data format. Instead, it
has externalized the components that perform reading, parsing, response
construction, and writing tasks.
The batch processor is shipped with some prebuilt readers and writers
that can be used as is; these tools are described later in this section.
The Request/Response framework also contains some parsers and constructors
that can be used for a given batch job.
If the batch input and output structures can be handled by a combination
of the prebuilt readers, writers, parsers, and constructors, then
you do not need to do develop any external components. For example,
if the batch input is an XML data format where each line contains
one XML request data and the expected output is also XML with each
line containing one XML response data, then you can use the prebuilt
components to handle this input and output. However, if either the
input or output structure, or both, cannot be handled with the available
components, new pluggable components must be written. For more information,
see the section on building custom batch jobs.
The available reader and writers are:
- File line reader – This can be used to read the batch input
from a file where each line in the file represents one record. This
reader is implemented by the com.dwl.batchframework.queue.FileReaderQueue
class.
- File line writer – This writer writes the output to an
output file with each batch record on a separate line. This writer
is implemented by the com.dwl.batchframework.queue.FileWriterQueue
class.
- Chained file writer – This writer writes the output to
one or more output files. The number of output files to write to is
configured using the Writer.properties file.
The writer is implemented by the com.dwl.batchframework.queue.WriterChainedQueue
class.
- Extended file reader – This reader is able to read a variety
of XML requests that conform to the platform service request schemas
such as TCRMService, DWLAdminService, DWLCompositeServiceRequest,
or any XML request that is configurable via the properties file. In
the process, the parser populates all configuration properties that
are necessary to inform the server for the request parser, response
constructor or target application. This reader is implemented by the
com.ibm.mdm.batchframework.queue.XFileReaderQueue class. To use this
reader, in addition to the usual property definitions, a property
TxTokens with the value of the top level element of the XML request
(that is, TCRMService, DWLAdminService, or DWLCompositeServiceRequest)
must be included in the batch_extension.properties file. Here is an example: ParseAndExecConfiguration.TxTokens=TCRMService. The value of the TxTokens field can not be used anywhere in the
body of the request XML. Default namespace XML files are supported,
but XSD files are not.
For more information on available parsers and constructors, see
the section on configuring the Request/Response framework.