We use Oracle Fusion ERP file based data import (FBDI) templates to load data into the interface tables from external sources, such as legacy systems and third-party applications and run processes to process the data manually. This will involves a number of manual steps from generating zip file from FBDI template, uploading to UCM and then running relevant import jobs to load data into interface table and then to base tables. Similar to what we have done earlier in post. We will develop GL Journals integration with callback in Oracle OIC where callback will report status for errors or success including all child processes.
Process Flow
We have given below the flow of all major activities involved in development to automate GL Journals integration with callback in Oracle OIC. We will also implement call back integration which will receive business events for success/errors from main GL Journals integration.
Create Connections
We will create three connections as follows. Please refer to other OIC articles for details of creating connections
- Rest connection for triggering integration and capture request id in response payload
- sFTP connection to read csv file from sFTP server
- Oracle Fusion ERP cloud adapter connection to trigger bulk import job
- Same ERP adapter connection will be used in call back integration
Create Integrations in Oracle OIC
The complete integration flow along with callback integration flow are given below. Later we will go step by step to develop these two integrations.
Configure REST Adapter
We will create a new app driven integration. Drop REST adapter on canvas, name it glgv and configure response payload to capture request id as show below. Define response payload to receive request id of GL import process from Fusion ERP.
Configure Variables
We have defined following variables and these will be used throughout whole integration development. The last variable is integration name here and we will use to fetch different values from a lookup to build up a property file which contains parameters and journal import program details.
Configure FTP Adapter
In order to read source file from sFTP, we will define and configure FTP adapter. We will use variables for specifying source directory and filename. For file schema, use the GL Journal import template provided by Oracle and use its format as shown below. The FBDI template can be download from here.
Configure Stage Write Action for GL Journal and Property Files
With reference to our high level flow above, we now need to write GL journal file and create a properties file. Now we need to write these file in OIC filesystem using stage file write action. Please use previously defined variables for the filename and directory for saving both files.
Now we will create properties file. Why do we need property and what is included in it, please visit this link for details. For Import Journals job, we will create property using stage file write action. Please note output directory is same as csv file above since we need to zip this directory. Also the extension of the property file should .properties.
For the property file, we have defined a lookup in OIC to store the values needed for Journal Import program. We will use first column “Integration” as an anchor value to search for other columns values to map to different fields for property file. See next screenshot with a sample mapping. The variable integration name is already defined as shown in start.
Now both the files (GlInterface.csv and properties file) are in OIC same virtual folder. We will now use stage file Zip operation to zip this folder. Remember to keep the same zip filename as it is said in variable.
Configure ERP Adapter
We now configure ERP adapter to load the zip file in Oracle Fusion ERP. Choose “Import Bulk Data into Oracle Cloud ERP”. We will also enable callback during adapter configuration since we will develop another integration to download the result of FBDI program in callback integration.
As a last step, add a map action after erp adapter and map the result of erp adapter to rest response payload to get the request id of ESS job from Oracle Fusion ERP.
Develop Callback integration
We have implemented GL Journal data import integration in OIC so far. We will now develop call back integration which will be triggered by Fusion ERP after the completion of OIC Journal Import integration.
In new App driven integration, drop ERP adapter on canvas and choose Receive Callback Event upon completion of FBDI bulk import job as shown below. We will set the download option for output/log files to Always i.e. for both success and error scenarios.
Since we will receive output/logs files whether parent integration ends in success or error, we need to store the received output zip file on sFTP server. Drop ftp adapter connection on canvas and configure write file and specify output directory with file pattern and map the fields as shown in next screenshot.
Activate and the Integrations
Set business identifier for tracking as per your requirement for GL Journal import and callback integrations. Place a CSV file designated ftp folder and test run the main integration.
Callback integration will be automatically after completion of main integration. Whether main integration ends in success or errors, output file of GL Journal import jobs will be stored in sFTP folder as per the configuration in callback integration above.