FILE UPLOAD FLOW AND TEMPLATE DEFINITION GUIDE

This document includes following topics:

File Upload Template Definition

A file upload template is an XML file, which defines the schema of the file, which one can upload in OBDX File Uploads.

Accounting Types:

The Header definition specifies the fields required to define the debit account. The Body definition specifies the fields required to define each credit account.

The structure of each template consists of the following XML nodes:

FileDefinition:

A FileDefinition node can be explained with the help of the following example:

File Upload

A Method to perform file level validations for a given File ID, a method to process the file for a given File ID etc.

The following image shows a sample custom File Handler code. The File Handler needs to mandatorily extend.

com.ofss.digx.app.fileupload.handlers.AbstractFileHandler

File Upload

The File Handler is the heart of the File Upload Engine and at this point of time, we do not expect anyone to completely customize the File Upload Engine itself. Therefore, we are not going to dive into the details of each method.

RecordDefinition:

All the below attributes represents the definition of a record.

A RecordDefinition node can be explained with the help of the following example :

File Upload

The Record Handler needs to mandatorily extend com.ofss.digx.app.fileupload.handlers. AbstractRecordHandler.

-1 represents infinite times. In the case of SDMC, since there will be only one debit account, the multiplicity of the header record would be 1.

Ex: If you specify length as 100, then the first 100 characters are considered as one record.

Field:

All the below attributes represent the definition of a field.

A Field represents various attributes that are required to perform a transaction. It contains:

For Example:

File Upload

So, the first 10 characters are considered as partyId. Length field is required for a fixed length template in order to parse the file and retrieve the values of various attributes. For a variable length record, this field should be empty.

Enrichers are of two types:

Static Enrichers:

Example 1:

File Upload

The field name ‘valueDate’ has enricherArgs ‘dd-MM-yyyy’ meaning that the date has to be specifically in ‘dd-MM-yyyy’ format. This value is simply available to the enricher for processing purpose. This enricher does not add any new field but simply modifies the value of the current field.

Example 2:

File Upload

The field name ‘debitAccountId’ has an enricher ‘ACCTCURR’ with no enricherArgs. In this case, ‘DIGX_FW_ENRICHMENTS_B’ will be queried and search for ‘ACCTCURR’ and ‘AccountCurrencyEnricher’ class is invoked. This enricher derives the debitAccountCurr. Hence, this attribute must be present in the record DTO with its setters defined.

Dynamic Enricher:

File Upload

For Example: enricherDynArgs=”beneId~beneName” on beneficiary address field, the parser simply invokes getters on beneId and beneName fields and passes the values to the enricher in a map. It should be noted that these fields must be defined previously/above the beneficiary address field, so that parser has already completed the setter operation.

File Upload

File Upload Flow

How does the File Upload work

The first step is the parsing and the validation of all the records in the file that needs to be uploaded.

The validation success depends on the approval level. The approval level is defined by the admin at the time File Identifier Mapping. The two types of Approval Level are:

Approval Level support for different accounting types:

Only after all the validations are successful, all the records are stored in the table

DIGX_FU_RECORD_MASTER and the data about the file is stored in the table DIGX_FU_FILEDETAILS as a single record.

Now, this data needs to be passed to the UBS schema for core banking processing.

However, before that, we populate this data in two tables referred as a mirror tables in the B1A1 schema. These tables are named DIGX_FU_FT_DETAILS and DIGX_FU_FT_MASTER. They are exact replicas of the two tables MSTM_COM_PMT_IN and MSTM_COM_PMT_INFILE respectively in the UBS schema where we are going to dump the file data finally.

After the data is populated in the tables DIGX_FU_FT_DETAILS and DIGX_FU_FT_MASTER of B1A1 schema, a Database Job performs a sanity check before putting the data into the UBS schema.

The name of the DB job is DIGX_CPG_FILEUPLOAD

The data is dumped from DIGX to UBS schema in the following sequence.

DIGX_FU_FILEDETAILS (DIGX) > DIGX_FU_FT_MASTER (B1A1) > MSTM_COM_PMT_INFILE (UBS).

DIGX_FU_RECORD_MASTER (DIGX) > DIGX_FU_FT_DETAILS (B1A1) > MSTM_COM_PMT_IN (UBS).

There is a column in the table DIGX_FU_RECORD_MASTER named REC_STATUS, which indicates the status of the records of the File.

Different Types of Record Status for the table DIGX_FU_RECORD_MASTER (The various procedures/stages of File Upload)

Different Types of File Status for the table DIGX_FU_FILEDETAILS.

Different types of file status in the table MSTM_COM_PMT_INFILE.

Few Examples/Scenarios and expected Behavior.

Now what if there are multiple records of a file and half the records have one status and other half of records have other status, what will be the status of the File in DIGX_FU_FILEDETAILS?

The sequence of the statuses is

So Consider that half the records of a file are in the Verified status and other half are Approved. In such scenarios the status of the File will always be of the lower scale of the two statuses, i.e. the status of the file will be verified. Only after all the records attain the Approved status, the File status will change to Approved.

UBS updates the status of the File Upload after every stage of host processing, in the tables MSTM_COM_PMT_INFILE and MSTM_COM_PMT_IN.

There is an EJB timer, which synchronizes the status of the table DIGX_FU_RECORD_MASTER with MSTM_COM_PMT_IN and DIGX_FU_FILEDETAILS with MSTM_COM_PMT_INFILE.

Now consider a future dated transaction. Here the status in the table MSTM_COM_PMT_INFILE is ‘U’ (Uploaded) after the UBS jobs are completed successfully.

At this stage, the status of the file in the DIGX table DIGX_FU_FILEDETAILS will be seen in the Approved state. The status will change to Processing in Progress in DIGX_FU_FILEDETAILS only after all the contracts are booked by the UBS and the status is updated to P (Processed) in the table MSTM_COM_PMT_INFILE in the UBS schema. This is because the cancellation functionality is only available when the status is processing in progress. That implies that if the status changes to Processing in Progress before the contracts are booked by the UBS, the cancellation functionality will be possible which is not logically correct. Hence, after the transaction is approved, it waits for the contracts to be booked by the UBS before updating the status as Processing in Progress.

Home