Overview

This plug-in is responsible for saving the data of document level fields for a particular batch instance to the external or same database. It takes the mapping file provided for the plugin and creates a SQL query to insert the mapped document level field into the mapped table.

Configuration

Configurable properties screenshot

Configurable properties

Following are the configurable properties available with the plugin:

Configurable property Type of value Value options Description
Database Export Switch List of values
  • ON
  • OFF
The switch that defines whether this plugin will run or not. Default value is “OFF”

DLF/Table Mapping

 

User can do mapping of DLF with table/column at following UI:

Configurable property Type of value Value options Description
Field Name List of values Document Level Fields User can select any DLF shows in combo box to do mapping.
Database Table Name List of values List of tables displayed User can select appropriate table in which extracted data to be filled.
Database Column Name List of values List of columns displayed User can select appropriate column in which extracted data to be filled.

User can do mapping of Table with table/column at following UI:

Configurable property Type of value Value options Description
Field Name List of values Created Tables User can select any table shows in combo box to do mapping.
Columns List of values Columns created corresponding to a selected table User can select any column shows in combo box to do mapping.
Database Table Name List of values List of tables displayed User can select appropriate table in which extracted data to be filled.
Database Column Name List of values List of columns displayed User can select appropriate column in which extracted data to be filled.

Additional Parameter Mapping UI:

User can map additional parameter like batch class id, description etc. using below UI:

Dependency

The plugin requires the following prerequisites:

  • Plugin does depend on any other plugin. But desired output comes only when the document level field has some extracted value.
  • A table with name as provide in the mapping file must be created with the following structure:
Field Name Null allowed
BATCH INSTANCE ID NO
BATCH CLASS ID NO
DOCUMENT TYPE NO
DOCUMENT LEVEL FIELD NO
VALUE YES
  • Connection with database should be created via Connection Manager UI.

 

Append or concatenate parameters for DB export

 

Applies to:

v4.0.6.0

 

Existing Functionality

In DB export, only one optional parameter per table column could be exported.

For example: If Db export configuration is done with database table “db_export” having columns col1, col2, col3, then in col1/col2/col3 only one optional parameter could be exported.

 

New Functionality

User can now append two or more parameters to be exported from the UI in single table column.

For example: If Db export configuration is done with database table “db_export” having columns col1, col2, col3, then user can append two or more parameters say “BATCHCLASSID” & “BATCHINSTANCEID” to be exported in a single column.

 

Impacted Areas

  • Export Batch: If a batch is exported using DB_Export plugin in export module, then this functionality will help in exporting concatenated optional parameters.

 

  • Schema Changes: Two new tables “optional_index_field_parameters” and “optional_table_column_parameters” have been added in database.

 

Process

  • Add a connection in System Configuration stating the details of database where batch is to be exported.
  • Add DB_Export Plugin in batch class and switch on DB_Export Switch.
  • Add DB Export Configuration in respective batch class.
  • Optional Parameters can be concatenated by selecting the parameters to be concatenated, right click and select “Append” from context menu.

 

 

Note:

1) The order in which the fields will be appended will be same as the order in which they are selected from list of available parameters.

2)  If a parameter has been added as an exported parameter, then it will not be removed from list of available parameters.

3) While removing any of the exported parameters, user will remove it by drag n drop the parameter to be removed in available parameter list, but that parameter will not be added again in available parameters list, as this list will always be the same.

 

  • Apply the changes.
  • Now execute a batch in this batch class.
  • Batch details with configured optional parameters should be present in database table.

 

Troubleshooting

Following are few common error messages seen due to mal-functioning of the plugin:

S no. Error message Possible root cause
1 Error in parsing DB Export Plugin mapping file, FileNotFoundException The “db-export-mapping.properties” file is not located at the “<SHARED_FOLDER_PATH>\<BATCH_CLASS_IDENTIFIER>”
2 Error in parsing DB Export Plugin mapping file, NoSuchElementException One or more properties “db-export-mapping.properties” is in incorrect syntax.
3 Problem occurred in updating database table One of the following reasons caused this:

  • Database connection setting is incorrect
  • Error occurred while writing values to DB.
4 Error in initialising Hibernate Connection Database connection settings are invalid.

 

<Back| 4.0.0.0 Release Documentation

Was this article helpful to you?

Engineering

Comments are closed.