In many
places this might be a common requirement to download/extract the OBIEE output
into a file system automatically. Manually it can be done by clicking on ‘Export’
button on the report page. Through IBOT/Agent also the output file can be
shared via email.
OBIEE
doesn’t provide any out of the box functionality to extract the report content
into file system. But this can be done using Action framework (in 11g) which
has a direct integration with Java. Any process that can be called via Java can
also be invoked from OBIEE11g.
This
section will cover how to extract the OBIEE report output into a shared folder
in .xls/.csv/.pdf etc. format using a Java method (EJB).
Implementation:-
Create
one .ear file (e.g. OBIEEContentExportApp.ear) and place it under <MIDDLEWAREHOME>.
Now to
deploy –
n
Open
weblogic console and go to deployments and then Lock & Edit
n
Click
‘Install’ from Summary of deployments tab
n
Select
path e.g. <MIDDLEWAREHOME>\OBIEEContentExportApp.ear and click Next
n
Select
‘Install this deployments as an application’ option and then Next
n
Select
bi_server1 as target and click Next
n
Leave
the default settings and click Next
n
Choose
‘No, I will review the configuration later’ option and click Finish
n
Click
Activate changes
n
Select
the application and then Start
Update “ActionFrameworkConfig.xml” file to enable
Java Method calls from OBIEE11g.
Navigate
to
“<MiddlewareHome\user_projects\domains\bifoundation_domain\config\fmwconfig\biinstances\coreapplication\ActionFrameworkConfig.xml”
and update the .xml file as described below:
<
registries>
< registry>
< id>reg03</id>
< name>Sample EJBs</name>
< content-type>java</content-type>
< provider-class>oracle.bi.action.registry.java.EJBRegistry</provider-class>
< description>Custom Java classes which can be invoked as an Action</description>
< location>
< path/>
< /location>
< custom-config>
< ejb-targets>
< appserver>
< context-factory>weblogic.jndi.WLInitialContextFactory</context-factory>
< jndi-url>t3://localhost:9704</jndi-url>
< server-name>localhost</server-name>
< account>WLSJNDI</account>
< ejb-exclude>mgmt</ejb-exclude>
< ejb-exclude>PopulationServiceBean</ejb-exclude>
< /appserver>
< ejb-app>
< server>localhost</server>
< app-context>ActionSamplesEJB</app-context>
< /ejb-app>
< /ejb-targets>
< /custom-config>
< /registry>
< /registries>
< registry>
< id>reg03</id>
< name>Sample EJBs</name>
< content-type>java</content-type>
< provider-class>oracle.bi.action.registry.java.EJBRegistry</provider-class>
< description>Custom Java classes which can be invoked as an Action</description>
< location>
< path/>
< /location>
< custom-config>
< ejb-targets>
< appserver>
< context-factory>weblogic.jndi.WLInitialContextFactory</context-factory>
< jndi-url>t3://localhost:9704</jndi-url>
< server-name>localhost</server-name>
< account>WLSJNDI</account>
< ejb-exclude>mgmt</ejb-exclude>
< ejb-exclude>PopulationServiceBean</ejb-exclude>
< /appserver>
< ejb-app>
< server>localhost</server>
< app-context>ActionSamplesEJB</app-context>
< /ejb-app>
< /ejb-targets>
< /custom-config>
< /registry>
< /registries>
<
accounts>
< account>
< name>WLSJNDI</name>
< description>Account used to access WLS JNDI.</description>
< adminonly>false</adminonly>
< credentialkey>JNDIUser</credentialkey>
< /account>
< /accounts>
< account>
< name>WLSJNDI</name>
< description>Account used to access WLS JNDI.</description>
< adminonly>false</adminonly>
< credentialkey>JNDIUser</credentialkey>
< /account>
< /accounts>
Login to OBIEE Enterprise Manager à Goto Weblogic Domain à Credentials à Create Map for oracle.bi.actions.
Create a Credential Key for JNDIUser using Weblogic
username/password.
Restart all OBIEE services.
Configuration & Testing:-
n
Login
to OBIEE 11g & Create an Agent
n
Select
the Content as ‘Analysis or Dashboard Page’ in Delivery Content tab
n
Select
the Recipient
n
Select
User Destination as “Home Page and Dashboard”
n
Invoke
the Java Method from Action tab
n
Enter
the filename with extension and path & choose the values as delivery
content
n
Schedule
the Agent or run it; it will generate the output file into predefined location