January 15, 2021

Invoke BI Report in OIC | Run Report Operation

In this article we will see the steps to invoke a BI Report in an Integration and then the steps to read its base64 encoded output.

we will do the development by breaking it into 2 parts :

PART 1 : Steps to invoke a BI Report
PART 2 : Steps to read the base64 encoded report output. (access link)


Lets start the development : ~

PART 1 :  Steps to invoke a BI Report :

Lets develop one schedule integration where we will configure a soap adapter connection to call the BI Report using runReport Operation and then do the mappings. First we will create the connection and then create the integration.

Create Connection : 
Here we will configure  " ExternalReprtWSSService WSDL URL " which can be used to run a report. The same connection we will use in below steps while developing integration.
    • Navigate to connection window and select SOAP adapter, give any meaningful name for connection.

    • Enter the ExternalReportWSSService WSDL URL  and Select the TLS Version. TLS Version depends on your ERP Cloud Application Instance. Mostly it is TLSv1.1
WSDL URL Format : https://<your oracle cloud application instance domain>/xmlpserver/services/ExternalReportWSSService?WSDL

    • Enter the *Username and *Password of the Oracle Cloud Application Instance. Click SAVE and TEST the Connection.



Create Integration :
Here we will create the integration using the above configured SOAP connection, do the mappings of required field and then do one round of testing.
    • Create one Scheduled Integration by giving some meaningful name.

    • Search for the connection which we have created above and select it.

    • Enter some meaning full name(ex: invoke BI Report) and then click NEXT.

    • Select the operation = runReport and then click NEXT

    • In headers configuration window, select Accept attachments in response. Click Next
    • SOAP Endpoint configuration completed. Click Done.


STEP 2 :
Now let's do the MAPPINGS. We will pass all the required fields to invoke BI report ( like Report Path, Report Parameters Name and its Value etc.)

    • Expand the "parameterNameValues" element

    • Expand "Item" and then enter your BI Report Parameter name in name* element (as shown in below image)
    • Now expand values* and map or pass Parameter Values in Item element (as shown in below image)
    • Parameter names and its values configuration completed


*Note : suppose you have multiple parameters for your BI Report then you have to repeat the Item tag and then pass the Parameter name and its Values similar as in above Step 2.
(check below image for reference)

    • enter your report path in reportAbsolutePath* element

    • enter "-1" sizeOfDataChunkDownload*


Step 3 : Inside this step we will enable the tracking and do one round of testing.

    • Enable the Tracking

    • BI Report call configuration completed. Click save and Close the integration edit window.


    • Activate the integration 

    • Submit the integration by clicking Submit now and then click on Instance Id to track the flow 

    • Once processing succeeded , open the flow by clicking start time
    • Click on active stream and check the payload received as output from report

We have successfully develop and tested the BI Call in Integration 😀. Now in next blog we will further see the steps to read this base64 encoded output data i.e. PART 2 of development work. Click to see next blog.


Read BI Report base64 encoded response

In the previous post we have seen the PART 1 of BI Report Invocation. If you don't have seen that requesting you to first check that out by clicking here.

In this article we will develop the left part (PART 2) i.e. convert the base64 encoded run report operation response  and then read it in proper XML format using stage activity.


PART 2 : Steps to read the base64 encoded report output.

    • Add Assign activity to decode the run report base64 encoded output

    • Enter a meaning full name and then click Create

    • Click "+" to create one Variable

    • Give variable any meaningful name and then click Edit icon


    • drag an drop the runReport Response (*reportBytes) and then put it inside a String function after that put Complete thing as input of decodeBase64ToReference function
[Please take reference from below image]

    • click save and close the assign activity window

    • Now lets add one Stage activity to read the response data in xml format


    • Enter any meaning full name and then click Create

    • configure the below parameter as suggested below 
Choose Stage File Operation : select Read Entire File
Configure File Reference : Select Yes 
Specify the file reference : click edit and drag and drop the assign activity variable in it. click save and Close. Click Next

    • select XML Schema (XSD) Document as File Structure and click Next

    • select the schema file and then click Next 


*Note : For your information the above selected schema is actually defining the structure of your BI Report Response. If you want to get the structure of your BI Report Response then just decode the base64 output data (just google base64 decode tool and then paste the base64 output to decode) and after that you can see the XML format. Using this xml you can create the schema file.

Base64 decode Tool
    • Stage Read operation configuration completed , click Done.

    • Save the integration and close the window. Activate the integration and submit it to test it.

    • Once integration processed successfully, open the monitoring window and check the stage Read Response. You can the see the Report Response in proper readable XML Format. Now you can use these data for further processing in the integration flow.

Thank You !we have successfully developed the integration to invoke BI Report in an integration. If you have any questions please do let me know in comment section.