January 15, 2021

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. 


  1. Nice article but to define schema there is an easier way. Go to OTBI Catalogs and run the report and export it as csv. Use the CSV file in the stage activity.


    1. Thanks Dev but this article is written from OIC perspective. For your approach we have to login different environment and do the rest suggested stuff's, which i don't want :)

  2. I am a beginner in OIC and thanks for your posts so much. It's very helpful for me to understand the platform. I can't wait to look forward to your next post :D

  3. Hi, Thanks for the blog. I would like to know how a report output that is large (>10MB) be handled in this kind of scenario? Appreciate a response.


  4. Sir i am big fan of your blog, can you please help to put the report catalog which is used here and xsd schema which is used.
    while practicing same i was facing some issue.


If you have any doubts, Please let me know.