Business Need
Using SQL queries executed by BI Publisher engine against Fusion SaaS database is a common practice in integration development, however it should be used carefully by taking into consideration its potential impact on online users.
In this article we will see how to utilize the SaaS ESS jobs to run the same queries in a asynchronous mode causing less load on the UI layer serving online users.
Solution Overview
- Fusion SaaS:
- Develop a BIP report model you need to invoke from an OIC integration
- Save sample data and generate report by using report editor (and not wizard)
- Create an XSL template (can use the generic template below)
- Define an ESS job pointing to the BIP report created, add parameters if needed
- OIC Integration:
- Use Fusion Cloud connector to submit the ESS job defined above
- Loop until the ESS job is complete by using getEssJobStatus
- In case of successful completion – download the ESS output to a staging file
- Unzip the ESS job output file, extract the report results
- Perform business logic as needed based on data fetched by BIP report
Detailed Example
Fusion Saas:
- Create a BIP report model
- View Output, Save Sample Data, Generate Report, Use Report Editor and Save
- Create a new XML template (default layout is needed to simplify ESS job submission and result extract)
Generic XSL Code:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
</xsl:stylesheet> - Define ESS job
OIC Integration:
- Submit ESS Job by using Fusion connector ERP Integration Service
- Map “/oracle/apps/ess/custom/BIP/” to Job Package Name
- Map “MY_USERS_REPORT” to Job Definition Name
- Map parameters if needed by duplicating Param List
- Wait until the ESS Job is complete by using the same connector ERP Integration Service and getEssJobStatus method
- Download the output file by using Fusion Connector ERP Integration Service and downloadESSJobExecutionDetails
Make sure you specify only OUT for download option – ensure only output in the resulting ZIP file: - Use staging file write, unzip and list to get the reference to the output file
- Process the file based on your business logic