Creating a File Import Batch Process
Creating a file import process involves creating the following components in the Oracle Utilities cloud service:
Plug-In Script
The first step is to create a plug-in script that will process the data in the upload file. This plug-in script should be created for the "Batch Control - File Upload" Algorithm Entity.
You can use sample plug-in scripts provided or create a new plug-in script with logic required for reading the record and identifying each record detail to properly create the insert statements for storing the data in the appropriate application tables.
The sample plug-in scripts provided illustrate how to call the supplied APIs for processing different types of source data including fixed position, comma delimited, and XML formats.
Sample Plug-in Scripts for Algorithm Entity: Batch Control - File Upload
Plug-In Script
Description
F1UplSmplFlt
Sample Flat File Upload Script
F1UplSmplDlm
Sample Delimited File Upload
F1UplSmplXML
Sample XML File Upload
Note: The F1UplSmplFlt sample script is designed to work with the sample data above.
Algorithm Type and Algorithm
The next step is to create an Algorithm Type and Algorithm that use the plug-in script you created above. In this sample file import implementation, the source data uses the fixed position format, so the Algorithm Type and Algorithm should use the F1UplSmplFlt script.
To create a new algorithm:
Create an Algorithm Type using the F1UplSmplFlt plug-in script.
Create a corresponding Algorithm for the Algorithm Type created above.
File Upload Batch Control
The last part of the cloud service configuration is to create a batch control that will use the new algorithm to import the data. You can create a new batch control by duplicating a template batch control and reference the new algorithm. The base product includes the Plug-in Driven File Upload (F1-PDUPL) batch control which can be used as a template.
To create a new batch control:
1. Duplicate the F1-PDUPL sample batch control to create your own batch control.
2. In the Algorithms tab, define the algorithm created above for the "File Upload" System Event.
3. Define default parameters for the batch control, if required.