Friday, December 28, 2012

Creating and Using Action Links and Actions


Overview

This tutorial shows you how to build and use actions to provide guided navigation, link to external web content, and invoke web services. You learn how to guide user navigation in dashboards and analyses using actions and action links, to access external web content in the context of your BI analysis, to use conditions and agents with actions to automate initiation of business processes, and to invoke a Web Service using actions and action links.
In this tutorial, you focus on a subset of the available types of actions you can use to drive functionality and navigation within your Oracle BI analyses and dashboards.

Prerequisites

Before starting this tutorial, you should:
1.Have access to or have Installed Oracle Business Intelligence Enterprise Edition 11g.
2.Have access to or have installed the Sample Application schema (BISAMPLE). To download and install the latest version of the Sample Application, including the Actions sample content, access this location on the Oracle Technical Network (OTN).

Enabling BI Navigation

In this topic you add an inline action link to a column in an analysis which navigates to another analysis in Oracle BI. Because the action link is set as a property of the column itself, the action is available from Table, Pivot Table, Graph, and Map views. After testing the inline action link and saving the analysis, you save the action link as a named action link in the Presentation Catalog.
To automate BI navigation and create a named action link, you perform the following steps:
  • Log in to Oracle BI EE and create an analysis
  • Add an action link to the analysis
  • Test the action link
  • Save the action in the Presentation Catalog

Log in to Oracle BI EE and Create an Analysis


1.Open a browser or a new browser tab and enter the following URL to navigate to Oracle Business Intelligence:
http://<machine name>:9704/analytics
In this tutorial the URL is http://localhost:9704/analytics
2.Sign in to Oracle BI. For this example, log in using the Sample Application user ID and password, which isabell/Admin123.
Screenshot for Step

3.In the left navigation pane, under Create... Analysis and Interactive Reporting, select Analysis.
Screenshot for Step
4.Select the Sample Sales subject area.
Screenshot for Step
5.Double-click the following column names in the Subject Areas pane to add them to the analysis:
Time.Time Hierarchy
Offices.D4 Company
Base Facts.1 - Revenue
Base Facts.2 - Billed Quality
Calculated Facts.Simple Calculations.20 Actual Unit Price

Screenshot for Step
6 .Click the Results tab to view the analysis results. The analysis results are displayed in a Compound Layout, which includes a Title view and a Pivot Table view. Verify that the Pivot Table appears as follows:
Screenshot for Step
7 .Click the New View button Screenshot for Step in the toolbar and select Graph > Line-Bar > Default (Standard).
Screenshot for Step
8 .Click the Edit View button Screenshot for Step for the Graph view.
9 .In the Graph editor's Layout pane, drag Time Hierarchy to the Sections drop target and select Display as Slider.
Screenshot for Step
10 .Click Done to close the Graph Editor.
Screenshot for Step
11 .In the graph's slider, expand the Time Hierarchy to view the Years level in the slider values.
Screenshot for Step
The slider should appear as follows:
Screenshot for Step
12 .Click the Save button Screenshot for Step to save your analysis.
13 .In the Save As dialog box, navigate to My Folders and click the New Folder button Screenshot for Step. Note that if you already have a Revenue folder in My Folders, you do not need to recreate it.
14 .In the New Folder dialog box, enter Revenue and click OK.
Screenshot for Step
15 .Name the analysis Revenue by Company and click OK.
Screenshot for Step

Add an Action Link to the Analysis


1 .Click the Criteria tab.
Screenshot for Step
2 .Click More Options button Screenshot for Step for the D4 Company column and select Column Properties.
Screenshot for Step

3 .In the Column Properties dialog box, click the Interaction tab, then click the drop-down list in the Value section to view the available interaction settings. In the Interaction tab, you can specify interactions for column headings and values. The default interaction is to drill in any associated hierarchy. Other options are to send Master-Detail events, which allow user actions in a column in a Master analysis to reflect in child analyses, and to initiate an action using Action links.
Screenshot for Step
4 .Select Action Links from the drop-down list. In the Action Links list, you can view, add, edit, and delete actions associated with the column. Notice that you can have multiple action links associated with a column. By default, actions available for a column appear in a popup when a user clicks the column value or heading in an analysis. You can use the "Do not display in a popup if only one action is available at runtime" option to reset this so that in the event only one action is available for a value or heading, the action is executed upon the user interaction. Leave this option unchecked.
Screenshot for Step
5 .Click the Add Action Link button Screenshot for Step.
6 .In the New Action Link dialog box, click the Create New Action button Screenshot for Step and select Navigate to BI Content. This new action is an inline action, in that it is created as part of the analysis it is saved in. Later, you will build and use named actions, which are saved in the Presentation catalog for reuse.
Screenshot for Step
7 .In the Select BI Content for Action dialog box, navigate to Shared Folders/2. Functional Examples/Demo, select theOrder Details analysis, and click OK.
Screenshot for Step
8 .In the Create New Action dialog box, click OK.
Screenshot for Step
9 .In the New Action dialog box, click OK, then click OK to close the Column Properties dialog box.
Screenshot for Step

Test the Action Link


1 .Click the Results tab.
Screenshot for Step
2 .In the Pivot Table view, click the Stockplus Inc. value in the D4 Company column. In the Action link pop-up list, select Order Details.
Screenshot for Step

3 .The Order Details analysis opens, with Stockplus Inc. Company passed automatically by the inline action.
Screenshot for Step
4 .Close the Order Details analysis browser window or tab.
5 .In the Graph view, click the Stockplus Inc. value in the D4 Company column. In the Action link pop-up list, selectOrder Details. You can access action links from multiple views in an analysis once they are added in the column properties for a column in the analysis.
Screenshot for Step
6 .Examine the Order Details analysis and then Close the Order Details analysis browser window or tab.

Save the Action in the Presentation Catalog


1 .Click the Criteria tab.
Screenshot for Step
2 .Open the column properties for the D4 Company column.
Screenshot for Step

3 .In the Column Properties dialog box, click the Interaction tab. In the Action Links list, select the Order Detailsaction link and click the Edit Action Link button Screenshot for Step.
Screenshot for Step
4 .In the Edit Action Link dialog box, click the More button Screenshot for Step and select Save Action As. Notice that the action you are saving is inline, or part of the Order Details Action link, which is currently associated with the analysis in the catalog. When you save the action as a named action in the Presentation Catalog, it can be secured independently and reused with other action links in other analyses.
Screenshot for Step
Notice in the More drop-down list that you can edit the action from within the action link or remove the action from the action link as well as saving it.
5 .In the Save Action As dialog box, save the action as Order Details Action in My Folders/Revenue. Notice you also have the option to replace the current action in the action link with a reference to the named action, so that any subsequent changes to the named action will be referenced in the action link. Leave this option unchecked, so that for the current analysis, the action remains an inline action, independent of the version you are saving in the catalog. Click OK to save the action.
6 .Click Cancel to close the Edit Action Link dialog box.
7 .Click OK to close the Column Properties dialog box.
8 .Save the analysis and navigate to the Home page to verify in the Recent section that the action has been saved in the catalog.
Screenshot for Step
9 .Click the Edit link for theRevenue by Company analysis to open it in the Analysis Editor.
Screenshot for Step

 

Enabling Web Navigation and Passing Parameters

In this topic you add an existing named action to a column, enabling navigation to a Web page from Oracle BI and passing contextual information from Oracle BI. Actions stored in the catalog can be secured independently and re-used across multiple analyses, dashboards, and agents. After adding the action, you set the action link it is associated with to display conditionally.
To enable Web navigation and pass parameters, you perform the following steps:
  • Add a named action to the analysis
  • Set the action link to display conditionally
  • Test the action link

Add a Named Action to the Analysis 

1.Open the column properties for the Revenue column.
Screenshot for Step
2.In the Column Properties dialog box, click the Interaction tab, select Action Links from the drop-down list for the column values, and click the Add Action Link button Screenshot for Step.
Screenshot for Step

3 .In the New Action Link dialog box, click the Select Existing Action button Screenshot for Step.
Screenshot for Step
4 .In the Select Action dialog box, navigate to Shared Folders/4. Actionable Intelligence/Actions/Actions to Navigate to a Web Page, select the Navigate to Google action, and click OK.
Screenshot for Step
5 .In the Edit Parameter Mapping dialog box, you can specify a contextual value, passing a specified value or a session or repository variable or a column value. For this tutorial, you pass a column value from the analysis as a parameter for the navigation to the search engine. Click the Change Type of Value drop-down list and selectColumn Value.
Screenshot for Step
6 .Click the Column Value drop-down list and select the D4 Company column to map the company information from the analysis to the search string when the Navigate to Google action is executed. Also notice that you can set the Fixed and Hidden options, which control whether a user can change or view the parameter at runtime. Leave these options set to the default, which allows the most control on the part of the user.
Screenshot for Step
7 .Click OK.

Set the Action Link to Display Conditionally


1.In the New Action Link dialog box, notice that since you selected a named action, the Show link options are now enabled, allowing you to determine whether the Action link is displayed whenever the interaction is performed or based on a condition. For this tutorial, you set the Action link to display for companies with revenue greater than 15,000,000. Select the Conditionally radio button.
Screenshot for Step
2 .Click the New Condition button Screenshot for Step and select 1- Revenue from the drop-down list.
Screenshot for Step
3.In the New Condition dialog box, create a conditon that specifies revenue greater than 15,000,000. Check your work against the screenshot below and click OK.
Screenshot for Step
4 .In the New Action Link dialog box, enter Search Company Information as the Link Text to specify what appears in the link when a user initiates the interaction, then click OK.
Screenshot for Step
5 .Notice in the Action Links list, the Show Link column indicates whether an Action Link is displayed always or conditionally. Click OK.
Screenshot for Step
6 .Click OK to close the Column Properties dialog box.

Test the Action Link


1 .Click the Results tab.
2 .In the Pivot Table view, hover over the Revenue value for the Stockplus Inc. company, which falls below 15,000,000. Notice that the no interaction is available for the value because it does not meet the condition.
Screenshot for Step

3 .Click the Revenue value for Genmind Corp, which exceeds 15,000,000. In the Action Link drop-down, select the conditional Search Company Information action link to execute its action.
Screenshot for Step

4 .Notice in the Navigate to Google dialog box that the Search Term parameter that is being passed as context for the action is displayed to the user and is editable, due to the Fixed and Hidden settings you retained when specifying the parameter mapping for the Navigate to Google action. Click Execute.
Screenshot for Step

5 .Verify that the value is passed as a search term to Google.
Screenshot for Step
Experiment with Revenue values in the Graph view as well to verify that the action link is pervasive through different views:
Screenshot for Step

 

Creating a New Action

You have created an inline action as part of an analysis and added an existing named action. Now, you will create a new named action and define action options that affect its presentation to users. Once saved, this action can be referenced throughout Oracle BI.
To create a new action, you perform the following steps:
  • Create a new action
  • Execute the action

Create a New Action

1 .Click the Home link to navigate to the Home page.Screenshot for Step
2 .In the Create Section click the Action link under Actionable Intelligence.
Screenshot for Step

3 .Actions can be of two types, either navigating to related content, be it within BI or on a web page or a transactional system, or invoking target functionality in an external system, for example a web service, Java method, or script. For this exercise, click Navigate to a Web Page to create another web navigation action..
Screenshot for Step

4 .The requirements for the New Action dialog box are dictated by the type of action you are creating. To enter the URL for the web page, open another browser tab and navigate to http://www.nasdaq.com and get a stock quote for Oracle (search on ORCL). Select the URL and copy it.
Screenshot for Step

5 .In the New Action dialog box, paste the URL for the web page.
Screenshot for Step

6 .Click the Define Parameters button.
Screenshot for Step

7 .Click the Define Parameters button. Notice that the parameters are extracted into two respective parameters automatically. Retain the default parameter names and settings. Notice also that the names of the parameters are populated in the syntax of the URL so that any user changes to the parameters initiated at time of action execution are automatically referenced in the URL.
Screenshot for Step
In the Parameters list, the parameters are automatically populated:
Screenshot for Step
Note that by default these parameters are set to be optional. Retain these settings.
Screenshot for Step
8 .Click the Options button to set options for the action.
Screenshot for Step

9 .In the Action Options dialog box, you can set options for the action's behavior and display. Select the Dialog Titleoption and set the title to Get Stock Quote. Also select the Execute Button Text option and change the text toNavigate. Click OK to save your changes and close the dialog box.
Screenshot for Step

10 .Click Save Action.
Screenshot for Step

11 .In the Save Action As dialog box, save the action as Get Stock Quote in My Folders.
Screenshot for Step

Execute the Action


1 .On the Home page, click the Execute link under the Get Stock Quote action in the Recent section.
Screenshot for Step
2.Notice that your settings for the action options are reflected in the execute dialog box, in the title and in the Navigate button. Click Navigate.
Screenshot for Step

3 .Confirm that the execution of the action has navigated to the ORCL quote in a new browser tab.
Screenshot for Step

 

Creating a Web Service Action

You have finished building a navigation action. Next you will build an action that invokes a Web Service. Invoke actions allow you to initiate target operations, functions, processes and workflows in external systems.
To create a new action, you perform the following steps:
  • Create a new action
  • Execute the action

Create a New Action

1 .Click the Home link to navigate to the Home page.
2 .In the Create Section click the Action link under Actionable Intelligence.
Screenshot for Step

3 .Click Invoke a Web Service.
Screenshot for Step

4 .In the Select Web Service dialog box, expand as shown in the screenshot below to navigate to and select theprocessRating operation in the CreditRatingServicethat is already registered with the Action Framework. Notice that you can also specify a URL to a WSDL document that describes a web service to make it available to the framework. Click OK.
Screenshot for Step
5 .In the New Action dialog box, notice that by default, the expected prompt value required by the web service is populated in the parameters. Click Options.
Screenshot for Step
6 .In the action options, reset the Dialog Title to Get Credit Rating.
Screenshot for Step
7 .Click the Action Results tab. For actions that invoke web services, there are additional options to provide feedback to the user based on the result from the web service. When a web service is invoked, it responds with an XML message. Using the options in the Action Results tab, you can customize what information from this response is presented to the user. In the case of this web service, the response includes the customer credit rating. To reference this, in the Dialog Text field, enter Credit Rating of this Customer is: @{1}
Screenshot for Step
The 1 in the syntax above represents a named expression that is extracted from the message response from the web service. You still need to build a value to map these results so that they will appear in the results dialog box to the user.
8 .In the XPath Results list, use the default value, 1, and in its XPath Expression field, enter Body//*.
Screenshot for Step
9 .Change the Dialog Title to Customer Credit Rating.
Screenshot for Step
10 .Click Show Preview to validate the results your users will see.
Screenshot for Step
11 .The preview should appear as follows. There is no value as yet from the web service.
Screenshot for Step
12 .Click OK to close the preview dialog box.
13 .Click OK to save the options and close the Action Options dialog box.
14 .In the New Action dialog box, click Save Action.
15 .Save the action as Get Customer Credit Rating in the Revenue folder and click OK.
Screenshot for Step

Execute the Action

1 .On the Home page, click the Execute link under the Get Customer Credit Rating action in the Recent section.
Screenshot for Step
2 .Enter 1234 as the customer number and click Execute.
Screenshot for Step
The web service is invoked by the action:
Screenshot for Step

3 .The information from the web service response appears in the response dialog box with your settings. Click OK.
Screenshot for Step

 

Consuming Actions

In the first topic, you added action links to an analysis. In this topic you explore other ways to reference and consume actions and action links within Oracle BI, including dashboards and agents. Where you can add an action depends on its type. For example, you can add invoke actions to agents, to automate a business process, with the exception of Invoke Browser Scripts actions. You can add navigate actions to dashboard pages, scorecards, and Key Performance Indicators.
To explore where you can add and use actions, you perform the following steps
  • Add an action to a dashboard
  • Call an action from an agent

Add an Action to a Dashboard

1 .In the Global Header, click Dashboards and select My Dashboard.
Screenshot for Step
2 .Click the Page Options button Screenshot for Step and select Edit Dashboard.
Screenshot for Step
3 .Drag an Action Link from the Dashboard Objects pane and drop it in the Dashboard Builder workspace. Notice that you can also add an Action LInk Menu object if you wish to include a drop-down menu including multiple action links to the dashboard.
Screenshot for Step
4 .Hover on the Action Link and click the Properties button Screenshot for Step.
Screenshot for Step
5 .In the Action Link Properties dialog box, enter Get Customer Credit Rating as the Link Text, and Credit Rating by Customer ID: as the Caption.
Screenshot for Step
6 .Click the Select Action button to add a named action to the link. Notice the other options in the dialog box, which allow you to specify that the link opens in another window and to specify a condition to determine whether the action link is shown on the dashboard.
Screenshot for Step
7 .In the Select Action dialog box, select the Get Customer Rating action you just created and click OK.
Screenshot for Step
8 .In the Edit Parameter Mapping dialog box, accept the defaults and click OK. The user will be prompted for the Customer ID required as a parameter for the web service.
Screenshot for Step
9 .Notice the other options in the dialog box, which allow you to specify that the link opens in another window and to specify a condition to determine whether the action link is shown on the dashboard. Click OK to save your Action Link Properties
Screenshot for Step
10 .In the Dashboard Builder, verify that the Get Customer Credit Rating action link appeards.
Screenshot for Step
11 .Click the Save button Screenshot for Step to save the dashboard, then click Run.
Screenshot for Step
12 .Verify the link appears on the dashboard. Click the action link.
Screenshot for Step
13 .Enter 1234 as the customer number and click Execute.
Screenshot for Step
The web service is invoked by the action:
Screenshot for Step

14 .The information from the web service response appears in the response dialog box with your settings. Click OK.
Screenshot for Step

Call an Action from an Agent

1 .In the Global Header, click New and select Agent.
Screenshot for Step
2 .Click the Actions tab. Notice that there are two sections that can be used to specify actions to be called when an agent completes. By adding actions to the first section, you specify that the action runs in the case that no condition exists on the agent and in the case that a condition exists and is evaluated to true. In the second section, you can set an action to run if the condition evaluates to false for the agent.
Screenshot for Step
3 .Click the Add Existing Action button in the first section. Notice that the buttons for adding actions are unavailable in the second section. This is because there are no conditions specified for the agent in the Condition tab. The Invoke per Row option is available for actions that are based on a condition, and is used to execute the action for each row returned by the condition.
Screenshot for Step
You now can specify available actions, depending on their type, using the same steps as above. For the purposes of this tutorial, you will not run the agent.

 

Summary

In this tutorial you learned how to use Oracle BI actions to provide guided analysis, navigate to external applications and content, and invoke Web Services.
In this tutorial, you have learned how to:
  • Enable BI navigation using actions and action links
  • Enable web navigation and pass parameters
  • Create a new navigation action
  • Create a new invoke action
  • Consume actions in analyses, dashboards, and agents