Integrating Oracle WebCenter and Oracle BI EE Part 3 : Adding BI Content to Custom Portal Applications

In the previous two postings in this series I looked at Oracle's WebCenter Portal application at a high-level, and then explained how analyses and other BI content from OBIEE 11g could be added to WebCenter Portal : Spaces applications. In most cases, if you're predominantly a BI developer this is as close as you'll come to WebCenter development, but there is another option where you can create your own custom Portal application, using Oracle JDeveloper 11g and a feature called Oracle WebCenter Portal : Framework.

Going back to my original product architecture diagram, WebCenter Portal : Framework and WebCenter Portal : Services are two parts of the WebCenter and ADF toolkit that WebCenter Portal : Spaces was built from.

By using the toolkit though rather than the prebuilt Spaces product, you can put together your own custom Portal application, mixing in elements of WebCenter Portal, bits of the general ADF toolkit, other products from Oracle that expose components through JDeveloper 11g, and of course BI content from OBIEE 11g. If you've been following this blog for a while now, you'll maybe remember that we covered integrating OBIEE 11g with Oracle ADF, the lower-level componentry from which Portal : Framework and Portal : Services are themselves built. Now though, let's take a high-level look at what's involved with the Portal : Framework toolkit, first by creating a simple ADF application that uses Portal : Framework components, and then looking at what's involved in integrating OBIEE content in with it, first by adding BI views directly into the ADF application, and then by delivering them as part of WebCenter Portal.

To start off, you'll need Oracle JDeveloper 11g, with the version number matching the version of OBIEE and WebCenter Portal that you're going to be using (at the time of writing, 11.1.1.6). Note that you can't use JDeveloper 12.x - this is built on WebLogic 12c and isn't compatible with either WebCenter Portal, or OBIEE, and presumably we'll need to wait for 12c versions of those products before JDeveloper 12c can work with them. Once you've got JDeveloper installed, you'll need to add a couple of JDeveloper extensions to make use of WebCenter Portal functionality (the first is mandatory, the second you might as well add at the same time):

  • WebCenter Customization Framework Design Time
  • WebCenter Framework and Services Design Time

Once you've added these, you can create a simple WebCenter Portal : Framework application by selecting this application type from the New menu.

Then, after stepping through a few wizard pages, you end up with a basic ADF application that uses the Portal : Framework component set to provide user login, page tabs, page templates and so forth. Once you deploy this application to the built-in Oracle WebLogic application server for testing, you can see the initial application, log in and test it.

This basic portal has no public pages associated with it except for this login (home) page, but you can add more pages to it, either from within the application itself using the same administration menu that we looked at in the previous post, or you can add the pages programatically using JDeveloper and ADF. For now thought let's think about how we can add BI content into this application.

  • You can add BI objects such as analyses, KPI watchlists and dashboards directly into an ADF page definition, as we did in last year's OpenWorld presentation
  • You can add the BI Composer component to your application, in order that users can create their own analyses to add to your application
  • You can create a connection through to the BI Presentation Services Catalog and give users the ability to add their own BI content into the portal page, as we did with Portal : Spaces in the previous post

Before we can do any of these things though, we need to do a couple of additional things within JDeveloper 11g to enable BI content within the application. First-off, there's another set of JDeveloper extensions to install: 

  • Business Intelligence SOAP Connection
  • Business Intelligence Logical SQL View Objects
  • Business Intelligence ADF View Regions
  • Business Intelligence ADF Task Flow
  • Oracle BI Composer Extension

If you want your users to be able to save personalisations that they make to analyses, dashboards, prompts and so forth, you then need to enable to MDS Runtime feature in your JDeveloper project, which is the same metadata store that OBIEE uses (stored in a database schema, rather than the default file store that JDeveloper gives you). Once you've done that, using the same Project Properties dialog in JDeveloper you should add Business Intelligence ADF View Components to the set of technologies that your JDeveloper project uses, so that you'll be given access to these features when creating your project.

Regardless of how you add BI content to your ADF application, the next step is to create a connection in JDeveloper to your BI Presentation Services server. Typically, you'd want to set up a BIImpersonateUser within your OBIEE security realm and have the ADF application connect as that, so that when the application uses security and the user enters their login credentials, these are passed to OBIEE and used (via impersonation) to view the catalog and analyses as that person (assuming usernames match across the systems). Using this approach, the simplest way to create the connection is to right-click on the Connections folder in the JDeveloper Application Resources pane, select New > BI Presentation Services … and then enter the connection details into the dialog that's then displayed.

A couple of things to bear in mind when creating this connection; first, if you intend to deploy the ADF application to a proper application server (rather than the embedded WebLogic Server within JDeveloper), you'll need to package up the Presentation Server credentials using migrateSecurityStore.py and then import them into that application server's credential store, so that the application can then refer to them when trying to connect to OBIEE (see this presentation from last year's Openworld for the process for JDeveloper/OBIEE 11.1.1.5). Second, you may well have SSL set up on your OBIEE server, and if that's the case you'd need to generate an SSL certificate from the OBIEE side, then import that into the environment that'll be running your application, with details of what's involved here in the OBIEE 11.1.1.6 Developers Guide manual. But now, we'll go for a simple unencrypted connection using the BIImpersonateUser to initially connect, and then the application's logged-in user credentials used to browse the Presentation Services catalog.

Next I need to add the Business Intelligence ADF View Object component to the project's technology scope, by right-clicking on the application within JDeveloper and selecting it from the Available list, like this:

You're now at the point where you could, if you wish, start dragging and dropping Presentation Catalog content directly into the ADF application, typically in a new page. To create a new page and add BI content directly into it, start by locating the Pages folder within the PortalWeb Content / oracle / webcenterportalapp / pages project folder, right-click and select New … Web Tier > JSF Page, like this:

This creates a new Java Server Faces page (a web technology designed for templated, rich-UI rapid-development applications) and gives you the option to select one of the Portal : Framework templates, or create a regular JSF page with no pre-formatting. In this first instance we're actually going to add a BI view directly into the page, to see how this compares with using the Portal : Framework approach. To do so, I locate some BI content (in this case, the Order Details dashboard page from the SampleAppLite application) and then either drag it onto the Design view of the page, or directly into the page source, locating it where I'd like the content to appear on the page. When you do so, if the BI object had parameters (i.e. filters) associated with it, a dialog is then shown allowing you to manually enter values, or associate them with values from variables, or with other components such as drop-down menus that could provide values for them. 

If you deploy BI content like this, you'll see that it's embedded directly into the application web page, which may be what you want if you're delivering a fixed application where users' don't need to add content or manage the page layout themselves. One final step before we try out the new page is to add it to the Portal page menu via the PortalWeb Content / Oracle / webcenterportalapp / page hierarchy / pages.xml file, and set permissions on it so that the page only displays once a user has successfully logged in (for security purposes, and also so that we can pass a user ID through the impersonation system and display their correct view of the Presentation Services catalog).

Once you've deployed the application to WebLogic (either a full install with all of the WebCenter Portal components, or the built-in WebLogic server that comes for testing purposes with JDeveloper 11g) you're then presented with the login page, like this:

Then once you're successfully authenticated, the new page comes up on the top-level page menu, and when you click on it, the BI content we've just added is displayed.

So that's the first option for adding BI content, where we've embedded it directly in the application. But what about enabling it via Portal : Framework, and making it available through the list of content types that's presented to users in the WebCenter Portal : Resource Catalog dialog, align with blogs, wikis, polls and other collaborative content? We can do this, but it requires a bit more configuration on the application side in JDeveloper, but once it's done then everything will be registered for the user and they can just add BI content as portlets, customising pages and content as they wish.

Before we do this though, there's another setup step in JDeveloper, this time adding some Java libraries into the application to include more BI functionality, like this:

These libraries came as part of the JDeveloper extensions we added earlier, and some of them (BI ADF Runtime, for example) may already be registered. Also, we need to edit three files that come as part of the JDeveloper project:

  • Portal / Web Content / oracle / webcenter / portalapp / catalogs / default-catalog.xml, to register the BI Presentation Server as a portlet source
  • Portal / Web Content / WEB-INF / weblogic.xml, to add some library references (these may already actually be there)
  • Descriptors / META-INF / weblogic-application.xml, again to add another library reference
  • Descriptors / META-INF / jazn-data.xml, to enable permissions on a BI ADF task flow type that's now available for use

I won't detail the exact edits here as they change from release-to-release, but this bit of documentation is what I used and I can confirm it all worked for me.

Now it's a case of creating a new JSF page for your application but this time choosing one of the WebCenter Portal templates, and then adding the Change Mode Button or Link component, along with the Page Customizable component, to make this new page editable and customisable by end-users.

One final step is to right-click on this new page and select the Edit Authorization... menu item, then set permissions on the page so that authorised users can customise, view and perform other required functions with the page.

All that's left now is to deploy the application, and then log in to see the set of pages available to us. When I click on the new page that I've just created, there's an Edit link in the corner, which when clicked on opens that particular page for editing, via a feature called Oracle Composer. When I click on the Add Content button that's then displayed, I can select from the list of content in the Resource Catalog, which now includes a folder for content from the BI Presentation Services catalog.

Selecting Oracle BI from the folder list then displays the top-level folders in the Presentation Catalog, and I can then navigate through this, using the logged-in users' credentials (via the BIImpersonateUser).

Finally, when I add the required catalog object to the portal page, I can see it in preview form on the page, allowing me to resize the display area and make any other changes before saving it and returning back to the main display view.

So there you have it. Over the past three postings we've looked at what WebCenter Portal is, and how you can use the prebuilt WebCenter Portal : Spaces product to quickly put together a team portal and add BI content to it. In this last posting, we've looked at the componentry behind WebCenter Portal and how you can create your own Portal applications from the ground-up in JDeveloper, and use the Portal : Framework features to programatically add BI content to your portal application. That's it for now, but keep an eye out for further postings on adding BI Composer to ADF applications, and using OBIEE as a data source for ADF applications along with using ADF view objects as data sources for OBIEE.