One of the most frequent challenges run into when designing reports is providing relevant drill downs. Sometimes it is not enough to provide just a hierarchical drilldown. You need to navigate to another report which might be coming from some other subject area to show all the details. In this post we will look into how we can use the action framework to navigate to any report and pass parameters from the main report to the drill down report.
The Action Framework was introduced in OBIEE 11g that provides functionality to invoke actions directly from within OBIEE. The Action Framework is a component of the Oracle BI EE architecture. It consists of the following items:
- Actions Web Services for creating and invoking actions that are deployed in the application server.
- Components that reside within the Presentation Server and Scheduler Services.
Actions-specific JavaScript in the presentation tier for creating actions and invoking certain action types directly from the browser. Actions are created and managed in the Oracle BI Presentation Services user interface and can be included within analyses, dashboards, agents, KPIs, and Scorecard objectives. There are several different types of actions, for example, Navigate to a BI Content or Web Page, Invoke a Web Service, and Invoke a Browser Script.
Some action types are automatically available when Oracle BI EE is installed, while others require specific configuration to make them One of the action types requiring additional configuration, you must provide information about the external systems hosting functionality to be invoked by the actions, including the location of the target functionality and access details.
One of the actions that is available out of the box is the “Invoke a Browser script” that provides a way to initialising a pre-defined javascript function stored in the server, retrieving it, adding parameters and finally executing it in the client’s browser. The flow of the this actions as documented by Oracle is
The following are steps required to setup a navigation using PortalPageNav
Define the custom function
The list of Javascript functions that can be invoked is defined in the userscripts.js file located under $BIEE_INSTALL_LOCATION/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/b_mozilla/actions
USERSCRIPT.customPortalPageNav = function(arg_array){
var str="parent.PortalPageNav(1";
for(args in arg_array){
var arg_name=args;
var value=arg_array[arg_name];
str+=",'"+value+"'";
}
str+=")";
eval(str);
}
The example below shows the definition of a "publish" object that defines parameters for the Action Framework. All functions within the USERSCRIPT namespace that include a "publish" object can be browsed for selection when creating an action. The publish object defines the array of parameters to be passed by an action to the target JavaScript function. Note that functions that do not have an associated "publish" object may still be invoked by an action, but the Action Framework is not able to browse to these private functions, and therefore parameters need to be added to the action definition manually.
USERSCRIPT.customPortalPageNav.publish={parameters:[
new USERSCRIPT.parameter("1","Dashboard","/shared/FOLDERNAME/_portal/DASHBOARDNAME"),
new USERSCRIPT.parameter("2","Page","Insert your Page"),
new USERSCRIPT.parameter("3","Table","Insert Table"),
new USERSCRIPT.parameter("4","Column","Insert Column"),
new USERSCRIPT.parameter("5","Value","Insert Value")]
};
Note: If you want to pass more than one parameter just keep repeating the following rows for the number of parameters you need to pass
new USERSCRIPT.parameter("3","Table","Insert Table"),
new USERSCRIPT.parameter("4","Column","Insert Column"),
new USERSCRIPT.parameter("5","Value","Insert Value")]};
After restarting the OBIEE Services you should be able to see it in the list of supported functions when you select “Invoke a browser script”
Using the CustomPortalPageNav function
To use the function in your report setup the action link as shown in the screenshot below
Once setup correctly when navigating from the main report to the drill down report the columns values from the main report can be used to filter in the drill down report.
Summary:
There are several ways of achieving interactions ins a report such as hierarchical drill downs, master detail linking and navigation. OBIEE action framework is a generic way to navigate when the standard ways of navigate does not work for e.g. when using a UNION report or when drill navigating from source to target built from different subject areas.