5 Steps to Exporting OBIEE Contents to a File System
I recently received a client requirement in which they wanted to store OBIEE (Oracle Business Intelligence Enterprise Edition) contents to a file system like SharePoint. This would enable users who are not familiar with OBI or trained on report building to be able to consume reports stored on SharePoint.
OBIEE 11g doesn’t provide any built-in method to allow agents to automatically export/archive content into a physical file location. This can be done by linking an action to the agent which invokes server scripts, like EJBs, VBs etc., which physically move the OBIEE 11g content to the file system.
OBIEE 11g Action Framework opens up direct integration with Java so any process that can be called via Java can be directly called from OBIEE 11g as well.
In this blog, we will archive/export OBIEE 11g content by Invoking a Java Method from actions.
Below are the steps that we will perform:
1. Create an EJB application for exporting reports to file system.
2. Deploy “OBIEEContentExportApp.ear” file into WebLogic managed server.
3. Update “ActionFrameworkConfig.xml” file to enable Java Method calls from OBIEE 11g.
4. Create a credential map and key for oracle.bi.actions.
5. Create an agent to export/archive OBIEE 11g content to file system.
STEP 1: Create an EJB Application Using JDeveloper:
1. Create the application by going to JDeveloper -> File -> New… -> General -> Generic Application and click “OK”:
2. Provide an application name:
3. Click on “Next”. Provide a project name: OBIEEContentExportApp. Then, click on “Finish”:
4. Next, create the Session Bean by right clicking on OBIEEContentExportApp -> New… -> Business Tier -> EJB and select “Session Bean” on the right pane and click “OK”:
5. Accept the default and click “Next”:
6. Provide the following and click “Next”:
– EJB Name: OBIEEContentExportApp
– Session Type: Stateless
– Transaction Type: Bean
Accept the defaults on steps 3 and 4 and click “Finish”.
7. Get the needed libraries from the server to execute this code. Transfer the file to the machine where JDeveloper is running. The libraries are under:
8. Import the needed libraries to execute this code. Right click on “MyEJBProject” -> Project Properties… Libraries and Classpath -> click on “Add JAR Directory”… -> Navigate to the directory where you put the actionframework-common.jar and scheduler/schedulerrpccalls.jar files and add them. Then click “Select”.
9. The following is the code that needs to be implemented in the EJB:
a) EJB Bean Code: OBIEEContentExportAppBean.class
// Referenced classes of package OBIEEContentExportApp:
// OBIEEContentExportApp, OBIEEContentExportAppLocal
public class OBIEEContentExportAppBean
implements OBIEEContentExportApp, OBIEEContentExportAppLocal
public String ArchiveReport(String filename, DataHandler report)
throws FileNotFoundException, IOException
File f = new File(filename);
FileOutputStream outputStream = new FileOutputStream(f);
return “Report Archived”;
b) EJB Remote Interface Java code: OBIEEContentExportApp.class
public interface OBIEEContentExportApp
public abstract String ArchiveReport(String s, DataHandler datahandler)
throws FileNotFoundException, IOException;
c) EJB Local Interface Code: OBIEEContentExportAppLocal.class
public interface OBIEEContentExportAppLocal
STEP 2: Deploy EAR file to WebLogic managed server:
- Open WebLogic console (http://localhost:7001/console) and go to deployments as shown below.
- Click “Lock & Edit” from Change Center as shown below:
- Click “Install” from Summary of Deployments tab as shown below:
- Select Path: < Middleware>\OBIEEContentExportApp.ear (refer below screen for example path) and click “Next”:
- Select “Install this deployment as an application” radio button and click “Next”:
- Select bi_server1 as target and click “Next”:
- Leave the default settings in the below window and click “Next”:
- Select the “No, I will review the configuration later,” radio button and click “Finish” as shown below:
- Click “Activate Changes” as shown below:
- You will see the message highlighted below once Activate Changes are successful:
- By default, the deployed application will be in prepared state. Here, select the application and start it as shown below:
- The deployed application should be in Active mode as shown below:
STEP 3: Update “ActionFrameworkConfig.xml” file to enable Java Method calls from OBIEE 11g:
We need to update the ActionFrameworkConfig.xml to enable Java Method calls from OBIEE 11g.
And update file as shown below (note that your t3:port could be different)…
<?xml version=”1.0″ encoding=”UTF-8″?>
<obi-action-config xsi:noNamespaceSchemaLocation=”afconfig.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<description>Custom Java for Financial Reports</description>
<displayname>Web Services and BPEL Processes</displayname>
<description>Account used to access WLS JNDI.</description>
STEP 4: Create a credential map and key for oracle.bi.actions:
- Login to OBIEE enterprise manager -> goto Weblogic Domain -> Security -> Credentials
- Create a new credential map named “oracle.bi.actions”:
- Create a new credential key for JNDIUser using your WebLogic username/pass:
- Restart all the OBIEE 11g services.
STEP 5: Create an agent to export/archive OBIEE 11g content to file system:
- Login to OBIEE 11g and create an agent as shown below:
- Navigate to Delivery Content tab and select content as “Dashboard Page” or any analysis shown below and click “OK”:
- Navigate to the Recipients tab and select any “Role” as recipient. Here, I selected the “biadmin” role for example. Refer the below screenshot:
- Select User Destinations as “Home Page and Dashboard” as shown below:
- Navigate to Actions tab and from Add New Action -> Invoke a Java Method as shown below:
- From Select Java Method pop-up window, select “ArchiveOBIEEContent” method as shown below and Click OK:
- You will get New Action window as shown below:
- Enter path as “/common/app/temp” and your file name along with extensions. Below is an example on UNIX:
Enter Location to Archive: /common/app/temp/New Joiners.pdf
Content to Archive: Delivery Content
And click “OK”.
- Save the agent and run it.
Now, you can see your delivery content overview dashboard page or analysis saved under given path as shown below:
Once the reports are exported to a file system, build a Cron job to copy them to a SharePoint destination.