Implementation Guide for Oracle Self-Service E-Billing > Customizing the Payment Consolidator Integration Module > Creating Customized Payment Consolidation Templates >
The Record XML Templates
The record XML templates contain instructions for the payment consolidation jobs to read the data in the input file and map it to the Java objects in Oracle Self-Service E-Billing. Similarly, individual record XML templates are used by the payment consolidation jobs to generate output files with the data required by the consolidator. For each type of input and output file required by your consolidator, you must create a separate record XML template file for each part of the file record:
- File header record. Marks the beginning of the file and provides the file creation and identification information.
- File tail record. Marks the end of the file and always contains statistical information such as how many types of records are in the file and the total number of each.
- Detail record. Detail records appear between the file header and tail records and contain information on each account, depending on the purpose of the file. It could be account enrollment, account deactivation, account update or bill summary.
- (If supported) Batch header and tail records. If the payment consolidator supports batch processing, then the detail records in the input file will be grouped by batch record. Batch header is stored at the beginning of a batch and the tail record goes at the end of a batch and enclose detail records.
Figure 30 shows the common file layout, consisting of a file header, file tail, and detail records.
Figure 30. Common File Layout for Payment Consolidation
|
Figure 31 shows the common file layout for a payment consolidator that uses batch processing.
Figure 31. Common File Layout for Payment Consolidation With Batch Processing
|
Components of the Record XML Template Files
The record XML template files require the following components:
- A root element name. Use the record prefix plus your consolidator's record type code as the root element name, as shown in the following table.
|
|
Example of a Consolidator's Record Type Code |
|
File Header |
PC_FileHeader_ |
0000 |
PC_FileHeader_0000 |
Batch Header |
PC_BatchHeader_ |
1111 |
PC_BatchHeader_1111 |
Detail |
PC_Detail_ |
2050 |
PC_Detail_2050 |
Batch Tailer |
PC_BatchTailer_ |
2222 |
PC_BatchTailer_2222 |
File Tailer |
PC_FileTailer_ |
9999 |
PC_FileTailer_9999 |
- The <record> element. Enclose all data element XML tags between
<record> and </record> , for example:
<PC_Detail_2050>
<record>
<recordType pos="1" len="1" required = "Y" target='%detailRecord.setRecordType(?)%'></recordType>
<billerID pos="2" len="16" fmt="AN" required = "N" target='%detailRecord.setBillerExternalID(?)%'></billerID>... ...
... ...
</record>
</PC_Detail_2050>
- A data element for the record type. The record XML template must include a subelement called recordType within the <record> element.
- Delimiters. The template engine only executes template statements that are enclosed in a pair of delimiters. In the record template XML file the delimiter is a percentage sign (%).
NOTE: In the file structure XML template, the delimiter is a dollar sign ($).
- Record element tags. For input files, each template XML file must specify:
<billerID pos="104" len="32" fmt="AN" required = "N" target='%detailRecord.setBillerExternalID(?)%'></billerID>
This tag retrieves the text from position 104 to 136, puts it into the member of class called detailRecord by invoking the method detailRecord.setBillerExternalID(?) defined by the target to set the biller external ID. The template executes the statement specified by the element attribute target enclosed between percentage signs (%).
For an output file, the rules in the record template XML file describing how to generate the output file fields are also defined by the XML elements, for example:
<billerId pos="49" len="32" fmt="AN" required="Y">%detailRecord.getBillerExternalID()%</billerId>
This tag writes the billerId field to the output file. The start position in line is 49 and the length of the field is 32. If the length of value is less than 32, then padding characters are used to fill the field. The value is retrieved by invoking detailRecord.getBillerExternalID(). For more information about using attributes, see Template Attributes. For information about variables you can use in the template XML files, see Template Variables.
|