Splitter Preparsers

Topics:

Splitter preparsers divide an incoming document into smaller pieces based on a specified delimiter. The incoming document could be an XML document or a flat file. Different preparsers handle different types of incoming documents. All streaming preparsers are splitter preparsers, but all splitter preparsers are not streaming preparsers. The following splitter preparsers are available:

Delimited Value Splitter Preparser (com.ibi.preparsers.XDDelVal)

Syntax:

com.ibi.preparsers.XDDelVal

Description:

The Delimited Value preparser is a delimited value handler, which is useful when the incoming message consists of a delimited value stream such as lines of comma separated values. The first line can optionally hold field names (DIF format input). An XML document is generated from the input with a child node of each row, and children of that row in turn for each value.

In a use case scenario, the Delimited Value preparser can be used when an incoming message consists of a batch of flat files that are delimited by a special character, such as '|'. This message also needs to be converted to XML format.

Parameters:

Parameter

Description

Root name *

The element name of the outer tag.

Dif *

Determines whether the first line should be treated as an element name.

Delimiter *

Determines the delimiter to be used. Select comma or tab from the drop-down list, or enter a specific character (for example, $) directly in the field. This is a single character, and can be specified in hex form as \xvv where vv is a hexadecimal value specification (for example, \x31).

Trim values

Determines whether all values should be trimmed.

Quotes

Determines whether surrounding quotes should be eliminated.

Empty elements

Determines whether empty elements at the right should be eliminated.

Include blanks *

Determines whether a blank line should be treated as a row with all null elements, or ignored.

Example:

  1. Select the Del Val (com.ibi.preparsers.XDDelVal) preparser from the Type drop-down list and click Next.

    The configuration parameters pane opens.

  2. Enter testroot in the Root name field.
  3. Select false from the Dif field drop-down list.
  4. Enter | in the Delimiter field and leave the default values selected for all the remaining fields.
  5. Click Next.

    The name and description pane opens.

  6. Enter a name (for example, DelvalPreparser) and an optional description.
  7. Click Finish.
  8. Construct an inlet, for example, PreparseInlet, which is associated with a file listener and the new preparser (DelvalPreparser).
  9. Define a simple move route and a default outlet for the channel.
  10. Build, deploy, and start the channel.
  11. Create a simple input text document (for example, TestData.txt), which contains the following:
    02|penny|copper|$0.01
    03|one dollar|paper|$1.00
    04|five dollars|paper|$5.00
    05|ten dollars|paper|$10.00
    06|twenty dollars|paper|$20.00

    When this input document is processed by the channel, an output XML document is generated with the following contents:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <testroot RowCount="4">
       <row rowcnt="1">
         <_nb02>03</_nb02>
         <penny>one dollar</penny>
         <copper>paper</copper>
         <_dlr0.01>$1.00</_dlr0.01>
       </row>
       <row rowcnt="2">
         <_nb02>04</_nb02>
         <penny>five dollars</penny>
         <copper>paper</copper>
         <_dlr0.01>$5.00</_dlr0.01>
       </row>
       <row rowcnt="3">
         <_nb02>05</_nb02>
         <penny>ten dollars</penny>
         <copper>paper</copper>
         <_dlr0.01>$10.00</_dlr0.01>
       </row>
       <row rowcnt="4">
         <_nb02>06</_nb02>
         <penny>twenty dollars</penny>
         <copper>paper</copper>
         <_dlr0.01>$20.00</_dlr0.01>
       </row>
    </testroot>

EDIBatchSplitter Preparser (com.ibi.preparsers.XDEDIBatchSplitter)

Syntax:

com.ibi.preparsers.XDEDIBatchSplitter

Description:

Description: The EDIBatchSplitter preparser splits a batch of EDI documents. For more information on how to configure the EDIBatchSplitter preparser, see the iWay Integration Solution for EDI User's Guide.

EDIFACTBatchSplitterPreparser (com.ibi.preparsers.XDEDIFACTBatchSplitter)

Syntax:

com.ibi.preparsers.XDEDIFACTBatchSplitter

Description:

The EDIFACTBatchSplitter preparser splits EDIFACT input files that contain multiple transactions or envelopes. This preparser should be used with the EDIFACTPreParser. For more information on how to configure the EDIFACTBatchSplitter preparser, see the iWay Integration Solution for UN/EDIFACT User's Guide.

EDIH7BatchSplitter (com.ibi.preparsers.EDIHL7BatchSplitter)

Syntax:

com.ibi.preparsers.EDISplitPP

Description:

The EDIH7BatchSplitter preparser splits a batch of HL7 messages.

Parameters:

Parameter

Description

Timestamp

Writes a timestamp to the log file.

EDIX12SplitterPreParser (com.ibi.preparsers.EDIHL7BatchSplitter)

Syntax:

com.ibi.preparsers.EDIHL7BatchSplitter

Description:

The EDIX12SplitterPreParser parses an EDI input file that contains one or more interchanges (ISA) and multiple documents, and creates multiple XML output files. One XML output file is produced for each document. For example, if the EDI input file contains three documents within one ISA, the EDIX12SplitterPreParser creates three XML output files, one per document. For more information on how to configure the EDIX12SplitterPreParser, see the iWay Integration Solution for EDI User's Guide.

HIPAABatchSplitter (com.ibi.preparsers.XDHIPAABatchSplitter)

Syntax:

com.ibi.preparsers.XDHIPAABatchSplitter

Description:

The HIPAABatchSplitter splits a batch of HIPAA documents. For more information on how to configure the HIPAABatchSplitter, see the iWay Integration Solution for HIPAA User's Guide.

HIPAASplitterPreParser (com.ibi.preparsers.HIPAASplitPP)

Syntax:

com.ibi.preparsers.HIPAASplitPP

Description:

The HIPAASplitterPreParser parses a HIPAA input file that contains one or more interchanges (ISA) and multiple documents, and creates multiple XML output files. One XML output file is produced for each document. For example, if the HIPAA input file contains three documents within one ISA, the HipaaSplitterPreParser creates three XML output files, one per document. For more information on how to configure the HIPAASplitterPreParser, see the iWay Integration Solution for HIPAA User's Guide.

SWIFTBatchSplitter (com.ibi.preparsers.XDSWIFTBatchSplitter)

Syntax:

com.ibi.preparsers.XDSWIFTBatchSplitter

Description:

The SWIFTBatchSplitter preparser is used when the expected inbound SWIFT data contains multiple SWIFT messages. The SWIFTBatchSplitter splits the input stream and produces byte[] groups as per the predefined splitting logic. For more information on how to configure the SWIFTBatchSplitter, see the iWay Integration Solution for SWIFT User's Guide.

XML Splitter Preparser (com.ibi.preparsers.XDXMLSplit)

Syntax:

com.ibi.preparsers.XDXMLSplit

Description:

The XML Splitter preparser is used to divide an incoming XML document into smaller documents at a specified, repeating child.

In a use case scenario, if the incoming XML document is large and has repeating segments, this document could be divided into smaller pieces to improve the speed at which messages are processed.

Parameters:

Parameter

Description

Level string *

Define in dot of slash notation, the path to the element on which to split. An asterisk character (*) specifies any tag at that element.

Sequence

If set to true, a count attribute is set into each root.

Example:

  1. Select the XML Splitter (com.ibi.preparsers.XDXMLSplit) preparser from the Type drop-down list and click Next.

    The configuration parameters pane opens.

  2. Enter /a/b in the Level string field.
  3. Click Next.

    The name and description pane opens.

  4. Enter a name (for example, PO.XMLSplit.Preparser) and an optional description.
  5. Click Finish.
  6. Construct an inlet, for example, OIA.861.PO.Split.Inlet, which is associated with a file listener and the new splitter preparser (PO.XMLSplit.Preparser).
  7. Define a simple move route and a default outlet for the channel.
  8. Build, deploy, and start the channel.
  9. Create a simple input text document (for example, a.xml), which contains the following:
<a>
 <b name="b1">
   <c>value of input element a/b@name=b1/c is 1</c>
   <c>value of input element a/b@name=b1/c is 2</c>
 </b>
 <b name="b2">
   <c>value of input element a/b@name=b2/c is 3</c>
   <c>value of input element a/b@name=b2/c is 4</c>
 </b>
</a>

When this input document is processed by the channel, the following output XML documents are generated:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<a>
  <b name="b1">
    <c>value of input element a/b@name=b1/c is 1</c>
    <c>value of input element a/b@name=b1/c is 2</c>
  </b>
</a>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<a>
   <b name="b2">
     <c>value of input element a/b@name=b2/c is 3</c>
     <c>value of input element a/b@name=b2/c is 4</c>
   </b>
</a>
<?xml version="1.0" encoding="ISO-8859-1" ?><batch>EOT</batch>