Skip Headers
Oracle® Retail Allocation Operations Guide
Release 15.0
E65743-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

6 Oracle Business Intelligence Enterprise Edition Integration in Retail Application

Oracle Business Intelligence Enterprise Edition is a comprehensive business intelligence platform that delivers a full range of capabilities, including interactive dashboards, ad hoc queries, notifications and alerts, enterprise and financial reporting, scorecard and strategy management, business process invocation, search and collaboration, mobile, integrated systems management and more. Oracle BI EE is based on a proven web service-oriented unified architecture that integrates with an organization's existing information technology infrastructure for the lowest total cost of ownership and highest return on investment.

It is a common requirement to embed the content from Oracle BI EE into ADF applications. Using the Oracle BI EE Presentation Services connection, Retail Applications can embed Oracle BI Presentation Catalog objects such as analysis and dashboard onto their ADF pages.

Showing Oracle Business Intelligence Enterprise Edition Reports and Dashboards in the Retail Application

Oracle BI EE Catalog Objects can be displayed in a Retail Application using the BIReportFlow task flow (/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow). Typically, this task flow is configured to be launched from the application's sidebar task panel to render a dashboard page. Refer to the section, "Adding a non-Oracle Business Intelligence Enterprise Edition Based Dashboard into the UI Sidebar" in the Customizing Retail Applications chapter for more information on adding Oracle BI EE based dashboards into the Retail Application.

The BIReportFlow taskflow takes the following input parameters:

Table 6-1 Input Parameters

Input Parameter Name Type Required Description

connectionId

java.lang.String

true

The connection name of the BISoapConnection. Example: BIConnection

biCatalogPath

java.lang.String

true

The path to the Oracle BI report or dashboard. Example: /shared/Customer Order/Demand Profit

obipsType

java.lang.String

false

The obipsType input parameter specifies if the Oracle BI EE content is an analysis or a dashboard. The acceptable values for the obipsType are biReportContent or biDashboardContent. If this input parameters is not provided biReportContent is used by default.

subItem

java.lang.String

false

The subItem input parameter specifies the sub item for the Oracle BI EE content. If the Oracle BI EE content is an analysis then a specific view from the analysis can be displayed using the subItem attribute. The valid values are compoundView!1

dvtchart!1

narrativeView!1

tableView!1

titleView!1

viewSelector!1

If the Oracle BI EE content is a dashboard then a specific tab from the dashboard can be displayed using the subItem attribute. The valid value will be the name of the tab in the dashboard.

viewReportLinks

java.lang.String

false

The input parameter viewReportLinks is used to display the links to refresh, print or export an analysis. The valid values are

r - refresh

p - print

d - export

Example: rfd

parameterName1

java.lang.String

false

The name of the filter or prompt.

Example:

"Business Calendar"."Fiscal Quarter"

A maximum of ten parameters can be passed to the Oracle BI EE content using the following input parameters to the taskflow.

parameterName1, parameterName2,

parameterName3, parameterName4,

parameterName5, parameterName6,

parameterName7, parameterName8,

parameterName9, parameterName10.

parameterValues1

java.lang.String

false

The value of the filter or prompt to filter the analysis or dashboard. The parameterValues can be EL expression.

Example:

2012Quarter1;2012Quarter2;2012Quarter3;2012Quarter4

A maximum of ten parameter values can be passed to the Oracle BI EE content using the following input parameters to the taskflow.

parameterValues1, parameterValues2,

parameterValues3, parameterValues4,

parameterValues5, parameterValues6,

parameterValues7, parameterValues8,

parameterValues9, parameterValues10.

The parameterValues[n] should match parameterName[n]. In the example above, the column "Business Calendar"."Fiscal Quarter" will be filtered with the values 2012Quarter1, 2012Quarter2, 2012Quarter3 and 2012Quarter4.

Multiple values should be separated with a semi-colon. Example:

2012Quarter1;2012Quarter2;2012Quarter3;2012Quarter4

additionalParameters

java.util.HashMap

false

A map that can be used to specify the parameters for the Oracle BI EE content. This parameter takes an EL expression.

Example:

#{TestBIReportFlowBean.demandProfitParametersMap}

Where the demandProfitParametersMap can be populated as follows

public Map<String, List> getDemandProfitParametersMap() {

Map<String, List> demandProfitParametersMap = new HashMap<String, List>();

List yearList = new ArrayList();

yearList.add(2010);

demandProfitParametersMap.put("\"Business Calendar\".\"Fiscal Year\"", yearList);

List quarterList = new ArrayList();

quarterList.add("2010Quarter1");

quarterList.add("2010Quarter2");

quarterList.add("2010Quarter3");

quarterList.add("2010Quarter4");

demandProfitParametersMap.put("\"Business Calendar\".\"Fiscal Quarter\"", quarterList);

return demandProfitParametersMap;

}

dashboardWidth

java.lang.String

false

The width of the Oracle BI EE dashboard. This attribute is used when the obipsType is biDashboardContent. If not provided it defaults to 100%.

dashboardHeight

java.lang.String

false

The height of the Oracle BI EE dashboard. This attribute is used when the obipsType is biDashboardContent. If not provided it defaults to 100%.


Various Examples of the BIReportFlow Taskflow

The examples below shows how the BIReportFlow taskflow can be used in the SideBarNavigationModel.xml file of the Retail Application to display the Oracle BI EE content in the application tab.

The example below will display the 'Demand Profit' analysis from the Oracle BI EE using the connection BIConnection.

        <Item id="testBIReportFlow"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_REPORT_FLOW}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
          </Parameters>
        </Item>

The example below will display the refresh print and export links in the 'Demand Profit' analysis.

        <Item id="testBIReportWithRefreshPrintDownloadEnabled"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_REPORT_WITH_REFRESH_PRINT_EXPORT_ENABLED}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
            <Parameter id="viewReportLinks">rfd</Parameter>
          </Parameters>
        </Item>

The example below will display just the dvtchart view from the 'Demand Profit' analysis.

        <Item id="testDVTChartView"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_DVT_CHART_VIEW}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
            <Parameter id="subItem">dvtchart!1</Parameter> 
          </Parameters>
        </Item>

The example below will display just the table view from the 'Demand Profit' analysis.

        <Item id="testTableView"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_TABLE_VIEW}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
            <Parameter id="subItem">tableView!1</Parameter> 
          </Parameters>
        </Item>

The example below will filter the 'Demand Profit' analysis using the fiscal year as 2012 and fiscal quarters as 2012Quarter1, 2012Quarter2, 2012Quarter3 and 2012Quarter4. The analysis should have prompted filters added for the columns Business Calendar"."Fiscal Year" and "Business Calendar"."Fiscal Quarter".

        
<Item id="testBIReportWithParameters"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_REPORT_WITH_PARAMETERS}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
            <Parameter id="viewReportLinks">rfd</Parameter>
            <Parameter id="parameterName1">"Business Calendar"."Fiscal Year"</Parameter>
            
            <Parameter id="parameterValues1">2012</Parameter>
                        <Parameter id="parameterName2">"Business Calendar"."Fiscal Quarter"</Parameter>            
            <Parameter id="parameterValues2">2012Quarter1;2012Quarter2;2012Quarter3;2012Quarter4</Parameter>
                                  </Parameters>
        </Item>

The example below will filter the 'Demand Profit' analysis using the fiscal year as 2010 and fiscal quarters as 2010Quarter1, 2010Quarter2, 2010Quarter3 and 2010Quarter4. Note that this example does not pass the parameters directly. It uses an EL expression to pass a parameter map with all the parameters.

        <Item id="testBIReportWithParametersMap"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_REPORT_WITH_PARAMETERS_MAP}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/Demand Profit</Parameter> 
            <Parameter id="obipsType">biReportContent</Parameter> 
            <Parameter id="viewReportLinks">rfd</Parameter>
            <Parameter id="additionalParameters">#{TestBIReportFlowBean.demandProfitParametersMap}</Parameter>                        
          </Parameters>
        </Item>

The demandProfitParametersMap can be created as follows in a bean.

  public Map<String, List> getDemandProfitParametersMap() {
    Map<String, List> demandProfitParametersMap = new HashMap<String, List>();
    
    List yearList = new ArrayList();
    yearList.add(2010); 
    demandProfitParametersMap.put("\"Business Calendar\".\"Fiscal Year\"", yearList);
    
    List quarterList = new ArrayList();
    quarterList.add("2010Quarter1");
    quarterList.add("2010Quarter2");
    quarterList.add("2010Quarter3");
    quarterList.add("2010Quarter4");
    demandProfitParametersMap.put("\"Business Calendar\".\"Fiscal Quarter\"", quarterList);
    
    return demandProfitParametersMap;
  }

The example below will show the 'Customer Order' dashboard with all its tabs. Note that the obipsType has been changed to biDashboardContent. It also passes the dashboard prompt "Business Calendar"."Fiscal Year" as 2011 to filter the results in the dashboard for the year 2011.

        <Item id="testBIDashboardAllTabs"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_DASHBOARD_ALL_TABS}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/_portal/Customer Order</Parameter> 
            <Parameter id="obipsType">biDashboardContent</Parameter>
            <Parameter id="parameterName1">"Business Calendar"."Fiscal Year"</Parameter>      
      
            <Parameter id="parameterValues1">2011</Parameter>            
          </Parameters>
        </Item>

The example below shows how to display one specific tab of the Oracle BI EE dashboard. It displays the 'Channel Profitability Comparisons' tab of the 'Customer Order dashboard. It passes the parameters map as EL expression just like the previous example.

        <Item id="testBIDashboardSpecificTab"
           title="#{adfBundle['RetailAppsJunitUiBundle'].TEST_BI_DASHBOARD_SPECIFIC_TAB}"
           type="taskflow">
          <url>/WEB-INF/oracle/retail/apps/framework/bi/flow/BIReportFlow.xml#BIReportFlow</url>
          <Parameters>
            <Parameter id="connectionId">BIConnection</Parameter> 
            <Parameter id="biCatalogPath">/shared/Customer Order/_portal/Customer Order</Parameter> 
            <Parameter id="obipsType">biDashboardContent</Parameter>
            <Parameter id="subItem">Channel Profitability Comparisons</Parameter>
            <Parameter id="additionalParameters">#{TestBIReportFlowBean.dashboardParametersMap}</Parameter>                        
          </Parameters>
        </Item>

Modifying the BIConnection Attributes at Runtime

When the application gets installed on the WebLogic Server, BIConnection is automatically created by the installer. However, it may happen that we may want to change the connection attributes post the application installation. This can be done for troubleshooting the existing BI connection or changing the BI connection to use a different Oracle BI EE server. The BI connection attributes can be modified using the Enterprise Manager using the following steps.

  1. Login to the Enterprise Manager of the environment where the Oracle Retail Application is deployed and go to 'System MBean Browser' as shown below.

    Figure 6-1 System MBean Browser


  2. Go to 'Application Defined MBeans' and its sub folder 'oracle.adf.share.connections'.

    Figure 6-2 Application Defined MBeans


  3. Expand the Oracle Retail application and select 'ADFConnections'. If the BIConnection is already created then you would be able to see the BIConnection as shown below.

    Figure 6-3 BIConnection


    If the BIConnection is not available then the 'ADFConnections' will not be expandable as shown below.

    Figure 6-4 ADFConnections


    Do the steps below to create a BIConnection if it is not available.

  4. Go to the 'Operations' tab and click 'createConnection'.

    Figure 6-5 Create Connection


  5. Enter Connection Type as BISoapConnection and Connection Name as BIConnection. Click Invoke on top right.

    Figure 6-6 BISoapConnection


  6. Refresh the tree using the button 'Refresh cached tree data'.

    Figure 6-7 Refresh Cached Tree Data


  7. Once the tree is refreshed, you will notice that 'ADFConnections' becomes a folder and it has a new connection 'BIConnection'. Click on the BIConnection to open its properties in the right pane.

    Figure 6-8 BIConnection Properties


  8. Enter the values shown in the table below. Once done, click Apply on the top right.

    Table 6-2 BIConnection Properties

    Value Description

    Context

    The context root of the Oracle BI EE installation. Example: analytics.

    Host

    The host of the Oracle BI EE installation.

    IsStaticResourcesLocationAutomatic

    The IsStaticResourcesLocationAutomatic attribute can be either true or false. When this attribute is true, the BI Presentation Server will be used to specify the location of the static resources. When this attribute is false, the attribute 'StaticResourcesLocation' should be provided. The attribute StaticResourcesLocation will be used to find the static resources when the attribute IsStaticResourcesLocationAutomatic is false.

    Password

    The password for the BIImpersonateUser.

    Port

    The port of the Oracle BI managed server. Example 9704

    Protocol

    http

    For production environments, use https.

    ShouldPerformImpersonation

    true (keep it true, default is true)

    StaticResourcesLocation

    The path of the location where the static resources are available.

    If the IsStaticResourcesLocationAutomatic attribute is true then use the following URL for the StaticResourcesLocation attribute.

    http://<obiee_host>:<obiee_port>/analytics

    If the IsStaticResourcesLocationAutomatic attribute is false, then use the following URL for the StaticResourcesLocation attribute.

    http://<web_tier_host>:<web_tier_port>

    The Oracle BI EE static resources, namely the 'res' and 'analyticsRes' directories should be available from the Oracle Web Tier's htdocs directory when the IsStaticResourcesLocationAutomatic attribute is false.

    Username

    The username that has been configured on the Oracle BI EE with the impersonate permissions.

    Example: BIImpersonateUser

    WSDLContext

    analytics-ws


  9. Go to 'ADFConections' to save the changes. Click on 'save' operation in the Operations tab.

    Figure 6-9 Save Operation


  10. Click Invoke on the top right to save the changes.

    Figure 6-10 Invoke Save


  11. Once the connection attributes for the BIConnection are saved, the changes are available to the Oracle Retail Application. There is no need to restart the server after saving. Simply logging out and logging in the application will suffice.

Enabling In-Context Launch from the Oracle Business Intelligence Enterprise Edition Content

The retail application provides the capability to launch taskflows in a new UIShell tab, from the Oracle BI EE content embedded directly in the application. The data from the Oracle BI EE analysis or dashboard can be passed to the application taskflow enabling in-context launch of the taskflow from the Oracle BI EE analysis or dashboard.

The retail application leverages the Action Framework of Oracle BI EE to deliver actionable business intelligence to user. The Action Framework provides functionality for creating, managing, and invoking actions. Actions are created and managed in the Oracle BI Presentation Services user interface. The retail application uses the ADF Contextual Event action to execute actions in the application.

More details about the ADF Contextual Event Action can be found in the document.

Oracle Fusion Middleware Developer's Guide for Oracle Business Intelligence Enterprise Edition at the following location:

https://docs.oracle.com/middleware/11119/biee/BIEDV/embedding_adf.htm#BIEDV1214

Enabling the Application Development Framework Contextual Event Action in Oracle Business Intelligence Enterprise Edition

The ADF Contextual event action is not enabled by default in the Oracle BI EE installation. It has to be manually enabled. Edit the following file in your Oracle BI EE installation

<OBIEE_HOME>/instances/<INSTANCE_NAME>/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml 

Add the following line in the above file and restart the Oracle BI EE instance.

   <ActionLinks>        <EnableADFContextualEvent>true</EnableADFContextualEvent>    </ActionLinks>

This will enable the ADF Contextual Event action in Oracle BI EE. Verify that the ADF Contextual Event is enabled in Oracle BI EE using the following steps.

  1. Edit any analysis and go to the Criteria tab.

    Figure 6-11 Criteria Tab


  2. Edit the Column Properties of any column and go to the Interaction tab.

    Figure 6-12 Column Properties


  3. In the Interaction tab select the Primary Interaction as Action Links for the Value of the column and click on the + icon.

    Figure 6-13 Primary Interaction


  4. Verify that 'ADF Contextual Event' is available as a new Action Link item.

    Figure 6-14 ADF Contextual Event


Preparing the Custom Shared Library for Contextual Event Model File

This section describes how to prepare the Custom Shared Library so retailers will be able to add in-context launch item that will be launched from the Oracle BI EE report.

  1. Perform the steps described in the section "Creating and Deploying a Custom Shared Library" in the Customizing Retail Applications chapter to create a Custom Shared Library workspace, generate a shared library WAR out of it, deploying the WAR, and associating the library to the Retail Application.

  2. Obtain a copy of the OBIEEADFContextualEventModel.xml file where the in-context launch taskflows will be added.

  3. Using JDeveloper, open the Custom Shared Library workspace in Developer Role.

  4. Add the OBIEEADFContextualEventModel.xml file in the View-Controller project src directory, preferably under a subdirectory called custom.

    Example:

    View-Controller/src/custom/bi/OBIEEADFContextualEventModel.xml

    The file OBIEEADFContextualEventModel.xml is similar to the other navigation model xml files as it uses the same NavigationModel.xsd schema. The file will be used to define the taskflows that will be launched in-context from the Oracle BI EE reports. The contents of the file can be as follows.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <NavigationDefinition id="Folder_1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="urn:www.oracle.com:oracle.retail.apps.framework.navigation"
      xsi:schemaLocation="urn:www.oracle.com:oracle.retail.apps.framework.navigation classpath:oracle/retail/apps/framework/uishell/navigation/model/schema/NavigationModel.xsd">
      <Items>
        <Item id="biInContextLaunchAction"
           title="BIInContextLaunchFlow"
           shortDesc="This taskflow is an example taskflow which is launched from an Oracle BI EE report in a new tab in Retail Application."
    type="taskflow" visible="#{true}" keysList="#{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}"
    targetTitle="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_FLOW} - #{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}">
    <url>/WEB-INF/oracle/retail/apps/framework/uishell/navigation/contentarea/flow/BIInContextLaunchFlow.xml#BIInContextLaunchFlow</url>
            <Parameters>
    <Parameter id="parameter1">#{payload.valueMap['"Customer Order Submit Channel"."Submit Demand Channel"']}</Parameter>
    <Parameter id="parameter2">#{payload.valueMap['"Customer Order Transaction"."CO Demand Order Ct"']}</Parameter>
    <Parameter id="parameter3">#{payload.valueMap['"Customer Order Transaction"."CO Demand Qty"']}</Parameter>
    <Parameter id="parameter4">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt LY"']}</Parameter>
    <Parameter id="parameter5">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt"']}</Parameter>
    <Parameter id="parameter6">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit LY"']}</Parameter>
    <Parameter id="parameter7">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit"']}</Parameter>
          </Parameters>
        </Item>
      </Items>
    </NavigationDefinition>
    
  5. Regenerate the shared library WAR file from the workspace and redeploy the shared library. Shutdown and restart of the Retail Application and its shared library registry is required.

Enabling the Application Development Framework Contextual Event Action on the Target Column

In the above step, we deployed a custom navigation model file and defined a navigation item in the model file that will be launched from an action in the Oracle BI EE analysis. Now, let's try to enable the action in the Oracle BI EE analysis.

Let's consider an example. We have an analysis called 'Demand Profit' analysis as shown in the screenshot below. The analysis has a pie chart view and a table view.

Figure 6-15 Analysis Chart


When the user clicks on any row of the column 'Submit Demand Channel' in the table view of the above analysis, we want to open the taskflow defined in the file OBIEEADFContextualEventModel.xml. Also, we want to pass data for the user's selection in the analysis to the taskflow as input parameters.

First, step is to enable ADF Contextual Event action for the data of the column 'Submit Demand Channel'. Refer to the section "Enabling the Application Development Framework Contextual Event Action in Oracle Business Intelligence Enterprise Edition" to see how to enable ADF Contextual Event for this column. Note that the Action Link should be added to the Value of the column and not to the Column Heading.

When a user clicks a data cell containing the Oracle BI EE ADF Contextual Event action, the system generates an Oracle BI EE ADF Contextual Event action that has a qualified data reference (QDR) of the cell as its payload. For more details about QDR, please refer to the Oracle Fusion Middleware Developer's Guide for Oracle Business Intelligence Enterprise Edition at location

https://docs.oracle.com/middleware/11119/biee/BIEDV/embedding_adf.htm#BIEDV1214

The payload received does not inform the application, which taskflow in the application should be opened for the ADF Contextual Event action from Oracle BI EE. The Retail Application relies on certain hidden columns in the analysis for this information.

Modifying the Oracle Business Intelligence Enterprise Edition Analysis to Enable In-Context Launch

The analysis in Oracle BI EE should be modified for enabling In-Context Launch. In the example above, we will edit the 'Demand Profit' analysis and add a hidden column as follows:

  1. Edit the analysis and go to the Criteria tab.

  2. Drag any column and add it to the analysis.

  3. Edit the Formula for the column.

    Figure 6-16 Edit Formula


  4. In the Edit Formula window, add a quoted text as follows.

    Figure 6-17 Column Formula Text


  5. The quoted text will tell application, what to open when the action is clicked in the Oracle BI EE analysis.

    The text is in the format

    '<path to the OBIEEADFContextualEventModel file>|<id of the item in the model file>'

    Example:

    '/custom/bi/OBIEEADFContextualEventModel.xml|biInContextLaunchAction'

    The column has to be marked hidden so that it is not displayed when the analysis is run. Edit the Column Properties, go to the Column Format tab and check Hide as shown in the screenshot below.

    Figure 6-18 Select Hide


    Now, we have added a column to the analysis which is hidden from display. When the user clicks on any row on the table view of this analysis, the column will be included in the QDR payload. The application will open the content requested in the column.

    In the example,

    '/custom/bi/OBIEEADFContextualEventModel.xml|biInContextLaunchAction'

    the application will open the navigation item with the Item id as biInContextLaunchAction in the file /custom/bi/OBIEEADFContextualEventModel.xml. The item id biInContextLaunchAction refers to the taskflow /WEB-INF/oracle/retail/apps/framework/uishell/navigation/contentarea/flow/BIInContextLaunchFlow.xml#BIInContextLaunchFlow as shown in the file "Preparing the Custom Shared Library for Contextual Event Model File". Ensure that the user has permissions to view the taskflow that you are trying to open.

Passing Parameters from the Oracle Business Intelligence Enterprise Edition Analysis to the Taskflow

When the user clicks on any column in the Oracle BI EE analysis that has the ADFContextualEvent action enabled, a qualified data reference (QDR) of the cell is received by the application as the payload. The application parses this payload and converts it into a format that could be easily used to populate the input parameters of the taskflow that is being opened in a new application tab.

The application will deliver a RetailAppsContextualEventPayload object whenever the ADFContextualEvent action is executed. The RetailAppsContextualEventPayload object has a map that stores the Oracle BI EE column name and its values which generated the contextual event.

Figure 6-19 Demand Channel


Let's assume the user clicked on 'Kiosk' row of the Submit Demand Channel column. The value Kiosk can be obtained using

#{payload.valueMap['"Customer Order Submit Channel"."Submit Demand Channel"']}

Similarly, the other data can be obtained using the format

#{payload.valueMap['<column formula in the analysis>']}

The value of CO Demand Qty for the row clicked by the user can be passed to the taskflow as input parameters using the following expression in the model file for the Item in the model.

<Parameter id="parameter3">#{payload.valueMap['"Customer Order Transaction"."CO Demand Qty"']}</Parameter>

Different Tabs for Each Set of Data

If you want to open different tabs for each row of data, you can use the keysList attribute to differentiate between tabs. You can use the targetTitle attribute to provide a unique name to each tab.

    <Item id="biInContextLaunchAction"
       title="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_FLOW}"
       shortDesc="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_SHORT_DESC}"
       type="taskflow" visible="#{true}" keysList="key=#{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}"
       targetTitle="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_FLOW} - #{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}">
 <url>/WEB-INF/oracle/retail/apps/framework/uishell/navigation/contentarea/flow/BIInContextLaunchFlow.xml#BIInContextLaunchFlow</url>
      <Parameters>
        <Parameter id="parameter1">#{payload.valueMap['"Customer Order Submit Channel"."Submit Demand Channel"']}</Parameter>
        <Parameter id="parameter2">#{payload.valueMap['"Customer Order Transaction"."CO Demand Order Ct"']}</Parameter>
        <Parameter id="parameter3">#{payload.valueMap['"Customer Order Transaction"."CO Demand Qty"']}</Parameter>
        <Parameter id="parameter4">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt LY"']}</Parameter>
        <Parameter id="parameter5">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt"']}</Parameter>
        <Parameter id="parameter6">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit LY"']}</Parameter>
        <Parameter id="parameter7">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit"']}</Parameter>
      </Parameters>
    </Item>

In the example above, if the user clicks on Kiosk and Mobile, each will open in a new application tab instead of using the same tab. The title of each tab will suffix the value of the column "Customer Order Submit Channel"."Submit Demand Channel" to differentiate between the tabs.

Pre-Processing the Data Before Opening the Content

It may be a requirement to pre-process the data that is received from Oracle BI EE before sending it to the application taskflow. For example, the application taskflow might require the data in certain data type which is different from what is received from Oracle BI EE. The Retail application provides a pre-processing hook for the applications to manipulate the data received from Oracle BI EE before sending it to the application taskflow. The applications can use the contentListener attribute of the Item element in the model file to invoke a pre-processing listener.

    <Item id="biInContextLaunchAction"
       title="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_FLOW}"
       shortDesc="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_SHORT_DESC}"
       type="taskflow" visible="#{true}" keysList="key=#{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}"
       targetTitle="#{adfBundle['RetailAppsJunitUiBundle'].BI_IN_CONTEXT_LAUNCH_FLOW} - #{payload.valueMap['&quot;Customer Order Submit Channel&quot;.&quot;Submit Demand Channel&quot;']}"
       contentListener="oracle.retail.apps.framework.uishell.navigation.contentarea.listener.OBIEEPreProcessListenerImpl">     
 <url>/WEB-INF/oracle/retail/apps/framework/uishell/navigation/contentarea/flow/BIInContextLaunchFlow.xml#BIInContextLaunchFlow</url>
      <Parameters>
        <Parameter id="parameter1">#{payload.valueMap['"Customer Order Submit Channel"."Submit Demand Channel"']}</Parameter>
        <Parameter id="parameter2">#{payload.valueMap['"Customer Order Transaction"."CO Demand Order Ct"']}</Parameter>
        <Parameter id="parameter3">#{payload.valueMap['"Customer Order Transaction"."CO Demand Qty"']}</Parameter>
        <Parameter id="parameter4">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt LY"']}</Parameter>
        <Parameter id="parameter5">#{payload.valueMap['"Customer Order Transaction"."CO Demand Retail Amt"']}</Parameter>
        <Parameter id="parameter6">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit LY"']}</Parameter>
        <Parameter id="parameter7">#{payload.valueMap['"Customer Order Transaction"."CO Demand Profit"']}</Parameter>
      </Parameters>
    </Item>
 

The listener implementation class should implement the oracle.retail.apps.framework.uishell.navigation.contentarea.listener.ContentListener interface and provide an implementation to the execute() method of this interface. The execute method will be invoked before the application taskflow is opened. In the example below, the data type of "Customer Order Transaction"."CO Demand Profit" is being changed from data type Integer to String as the application taskflow expects this value to be a String type.

 
package oracle.retail.apps.framework.uishell.navigation.contentarea.listener;
 
import java.io.Serializable;
 
import java.util.HashMap;
import java.util.Map;
 
import oracle.retail.apps.framework.publicui.contextualevent.RetailAppsContextualEventPayload;
import oracle.retail.apps.framework.uicomponents.util.ADFFacesUtil; 
public class OBIEEPreProcessListenerImpl implements ContentListener, Serializable {
  @SuppressWarnings("compatibility")
  private static final long serialVersionUID = 1L;
   public OBIEEPreProcessListenerImpl() {
    super();
  }
   @Override
  public void execute() {
    //get the original payload from the request
    RetailAppsContextualEventPayload payload =
      (RetailAppsContextualEventPayload)ADFFacesUtil.getRequestAttribute("payload");
    //original value is of type Integer
    Integer demandProfit =
      (Integer)payload.getValue("\"Customer Order Transaction\".\"CO Demand Profit\"");
     //modify the value to be of type String
    Map valueMap = payload.getValueMap();
    Map modifiedValueMap = new HashMap();
    modifiedValueMap.putAll(valueMap);
    modifiedValueMap.put("\"Customer Order Transaction\".\"CO Demand Profit\"",
              String.valueOf(demandProfit));
     //put the new payload object in the request
    RetailAppsContextualEventPayload modifiedPayload =
      new RetailAppsContextualEventPayload(modifiedValueMap, null);
    ADFFacesUtil.setRequestAttribute("payload", modifiedPayload);
  }
}

In-Context Launch from the Chart View of the Analysis

In-Context Launch from the chart view of the analysis is different from the table view. When the hidden column is added as described in the section "Modifying the Oracle Business Intelligence Enterprise Edition Analysis to Enable In-Context Launch", it becomes available in the QDR payload in case the analysis has a table view, which enables the Retail Applications Framework to launch the content requested in the hidden column.

If the analysis has a chart view, then the hidden column has to be explicitly added in the chart view to be included in the payload.

Figure 6-20 Demand Chart View


In the pie chart above, if the user clicks on B and M, the payload will not include the hidden column by default. In order include the hidden column in the payload, we will edit the chart and add the column to Sections in the chart.

Figure 6-21 Include Hidden Column


Adding this column to the Sections of the chart will not have any impact on the chart as the column has the same data for each row. However, this will include this column in the payload received from the chart, enabling the Retail Application to open the content requested in the payload.

There is an issue related to the ADFContextualEvent action generated from the chart view of an analysis. The payload only includes the dimensions and not the measures values. In the example above, only the dimension Submit Demand Channel will be included in the payload. The measure CO Demand Qty or CO Demand Retail Amt will not be included. So, the measure values cannot be passed to the taskflow as input parameters, if the ADFContextualEvent is generated from an Oracle BI EE chart.

Opening Different Taskflows from the Same Analysis

It may be a requirement that you want to open one taskflow from one column in the analysis and a different taskflow from a different column. Let's consider an example.

Figure 6-22 Taskflow Column


If the user clicks on any Fiscal Week value in the table above we want to open a taskflow say Taskflow1 in a new application tab. If the user clicks on CO Pick Qty, we want to open another taskflow say Taskflow2 in a new application tab.

The Retail Application provides this capability to open different content from different columns in the analysis by using multiple hidden columns. In this example, we will use two hidden columns as shown in the screenshot below.

Figure 6-23 Two Hidden Columns


The first hidden column is

'/custom/bi/OBIEEADFContextualEventModel.xml|biInContextLaunchAction|"Business Calendar"."Fiscal Week"|biInContextLaunchMultipleTargetColumns1'

The second hidden column is

'/custom/bi/OBIEEADFContextualEventModel.xml|"Customer Order Transaction"."CO Pick Qty"|biInContextLaunchMultipleTargetColumns2'

When the user clicks either the Fiscal Week or the CO Pick Qty, the ADFContextualEvent action will generate the QDR of the cell as a payload. The payload will include both hidden columns that we added to the analysis. The Retail Application will check which column is clicked; it will then verify in the list of hidden columns which action to invoke for that column. So, in the above example, if the user clicks 2011Week32 as the Fiscal Week, the Retail Application will open the content defined for the Item id biInContextLaunchMultipleTargetColumns1 in the model file /custom/bi/OBIEEADFContextualEventModel.xml.

The format for defining hidden column in such a case is

'<path to the OBIEEADFContextualEventModel file>|<Column name in the analysis>|<id of the item in the model file>'