The steps in the following section take advantage of the Oracle BI 12c skinning and styling customization options. Modifying these options is predominantly manual in nature. The idea of look and feel as it relates to Oracle BI translates into skins, styles, and messages.
Messages are usually the textual elements that are shown in the Oracle BI portal (presentation services) and can be anything from the header logo and text, to the name of each link shown above the dashboard tabs. An example of the latter would be changing the sign out link on the portal dashboard to render Get out of here!
instead.
Styles and skins relate to both the color scheme shown in the Oracle BI portal and the visible nature of Oracle BI Analysis Views. An example of modifying a style would be to change the background color of a dashboard from the default white color to a light gray. An example of skinning would be to modify the bar chart's color scheme from its default to a custom color palette.
Creating new styles and skins means creating the files and folders which contain your custom code, and deploying these files into the BI Server.
Examples of the files and folder structures required for your custom code can be found in the analytics Enterprise Application aRchive (EAR) file. The analytics EAR file can be found in the <Oracle_home>bibifoundationjee
.
You can open EAR and WAR files using the 7-zip utility. See http://www.7-zip.org/
Inside the EAR file is a Web Application Archive (WAR) file, which contains the res
folder; for example, see <Oracle_home>bibifoundationjeeanalytics.earanalytics.warres
. Here you will see the styles which are already available to your users, such as Skyros, Alta, blafp, Fusion, and FusionFX.
The folders that should be used as templates are prefixed with s_
and sk_
, which specifies the style and skin folders respectively. As an example, one of the default sets of style and skin folders provided out-of-the-box are s_blafp
and sk_blafp
. If modifying both the skin and styles, both of these folders will be leveraged.
In addition to styles and skins, custom messages can be used to modify the Oracle BI dashboards. There are hundreds of messages within the Oracle BI 12c environment that are dynamically accessed and generated at runtime. The core messages can be located in XML files contained within the following folder: <Oracle_Home>bibifoundationwebmsgdbmessages
.
Each XML file acts as a grouping container, as suggested by the name, containing one or more message objects that are referenced by Oracle BI at runtime. These messages can be overridden, and a few will be in this exercise. This dynamic messaging system also allows flexibility for localization (that is, translation into other languages or specific text to other languages). In order to either create custom templates or modify a template to another language, a separate custom messages folder and XML file will be established away from the default message folder referenced in the preceding section. The message that is desired to be overridden, is usually first assessed from the default messages folder location. Attributes about the message are noted and the overriding message is then created in a new arbitrarily named XML file. The XML file is placed in a filesystem
folder, and is ultimately moved into a web application (or folder) that gets deployed to the WebLogic Application Server.
Before we can deploy the style code, we need to create it! We could do this from scratch, or by copying an existing style's folders, or you may prefer to take a shortcut and start with an existing pre-built structure. Luckily, Oracle have provided a simple EAR file to start with, called bicustom-template.ear
. The bicustom EAR file is based upon the Skyros style. You can find this file in <Oracle_home>bibifoundationjee
.
The first stage is to extract the files:
C:fmw_bookobiee_dev
.ear
.war
.bicustom-template.ear
into the ear
folder.bicustom-template.ear
file into c:obiee_devear using 7-zip
, or use the Java command:cd c:fmw_bookobiee_devear jar xvf bicustom-template.ear
META-INF
and a WAR file in the ear
folder.bicustom-template.ear
file.bicustom.war
into c:obiee_devwar
, use 7-zip or a Jar
command:copy bicustom.war c:fmw_bookobiee_devwar cd c:fmw_bookobiee_devwar Jar xvf bicustom.war
C:obiee_devearbicustom.war
(we will generate our own war file).
In this exercise, we will modify the Oracle BI 12c dashboard for a fictional organization, Company XYZ. Their standard company color palette is made up of the following:
We are now going to create our new style by renaming the component parts and mapping them to a style:
s_Custom
to s_BookStyleOne
.sk_BookStyleOne
in the same folder as s_BookStyleOne
.filemap.xml
, changing s_Custom
to s_BookStyleOne
, and sk_Cusom
to sk_BookStyleOne
.The code should now read as follows:
<FileMap> <Styles Default="s_blafp"> <Hierarchy>s_Skyros / s_BookStyleOne</Hierarchy> </Styles> <Skins Default="sk_blafp"> <Hierarchy>sk_Skyros / sk_BookStyleOne</Hierarchy> </Skins> </FileMap>
You will now have two folders in the res
folder:
master.css
(in the ress_BookStyleOnemaster
folder).masterBrandingArea
, and change the values to:masterBrandingArea { background-color: lightsteelblue; color: black; padding: 5px; }
masterMenuButtonGlobal
, and change the values to:masterMenuButtonGlobal { color: black; }
custom.css
(in the ress_BookStyleOnemaster
folder).HeaderBarSeparator { border-top: 1px dashed magenta; }
In the first example, we will use method one; Create and deploy an Enterprise Application aRchive (EAR) file. We will use the Java JAR
command in a cmd window to create our files.
war
folder, into a WAR file called bicustom.war
:Cd c:fmw_obieeobiee_devwar Jar -cvf bicustom.war *
bicustom.war
file into the ear
folder:copy bicustom.war ..ear
ear
folder, creating a file called bicustom.ear
:Cd c:fmw_obieeobiee_devear Jar -cvf bicustom.ear *
<ORACLE_HOME>user_proctsdomainsbibidatacomponentsOBIPS
:copy c:fmw_obieeobiee_devearicustom.ear c:fmw_obieeoracle_home user_proctsdomainsiidatacomponentsOBIPSicustom.ear
You now have a file ready to deploy, so we will now use the WebLogic screens to deploy the file:
http://localhost:9500/console
.
bicustom.ear
file is: c:fmw_obieeoracle_home user_proctsdomainsbibidatacomponentsOBIPSbicustom.ear
:
The application is now installed on the BI Server, but is not yet running, and is not yet being used by OBIEE. First, we will set it to be running, then we will restart the service so that OBIEE picks up the new code:
So, the application is now running, but OBIEE still doesn't know about it. In theory, we could restart the OBIEE Presentation Service now and the new style would be available. In practice, we usually find that a full restart is best for a new deployment:
You will now see your dashboard in our new corporate colors. Notice the dashed line and the Steel Blue header background.
Congratulations, you have implemented a new style.
Editing your new style can be easily achieved using the following steps:
Let's give it a try:
custom.css
):.HeaderBarSeparator { border-top: 1px solid magenta; }
bicustom.ear
file which includes your updated code.c:fmw_obieeoracle_home user_projectsdomainsbibidatacomponentsOBIPS
.There is no need to restart the presentation service, but you will have to reload the files and metadata in the OBIEE Administration screen:
At this point, you may have to clear your cache in your browser.
When you view Dashboard One, you should now see the solid magenta line.
We mentioned earlier that there are two ways of implementing your custom code. Previously, we have shown how to implement using a deployed application in the WebLogic server.
We will now look at the alternative method, which is to deploy a folder instead of an application.
In the first part, we will create a new style in a custom
folder.
This time we will start with a copy of the Skyros code, which we will get from the analytics.ear
file:
s_skyros
and sk_skyros
from the folder C:fmw_bookOracle_homebibifoundationjeeanalytics.earanalytics.warres
, into a temporary folder.C:fmw_bookBookCustomCode
.bicustom.war
file into C:fmw_bookBookCustomCode.
C:fmw_bookBookCustomCoderesbicustom
.s_skyros
from the temporary folder into BookCustomCoderes
.sk_skyros
from the temporary folder into BookCustomCoderes
.s_skyros
folder (in the res
folder) to s_BookStyleTwo
.sk_skyros
folder (in the res
folder) to sk_BookStyleTwo
.You should now have the current folders in place, ready for creating a new style:
filemap.xml
file (C:fmw_bookBookCustomCodefilemap.xml
):<Styles Default="s_blafp"> <Hierarchy>s_Skyros / s_BookStyleTwo</Hierarchy> </Styles> <Skins Default="sk_blafp"> <Hierarchy>sk_Skyros / sk_BookStyleTwo</Hierarchy> </Skins>
master.css
(found in the master
folder):masterBrandingArea { background-color: burlywood; color: black; padding: 5px; }
custom.css
(also found in the master
folder):HeaderBarSeparator { border-top: 5px solid blanchedalmond; }
Now we will deploy the new custom folder into OBIEE:
AnalyticsRes
./analyticsRes
in the Context Root box.Now we will start the new application:
In order for OBIEE to use the new folder, we need to update the configuration file, instanceconfig.xml
.
This file is located in <BI DOMAIN>configfmwconfigbiconfigOBIPS
.
Please take a backup of the file before editing it:
instanceconfig.xml
.<!-- Customisation added --> <URL> <CustomerResourcePhysicalPath>C:fmw_bookBookCustomCode es </CustomerResourcePhysicalPath> <CustomerResourceVirtualPath>/analyticsRes/res </CustomerResourceVirtualPath> </URL>
We will now check that BookStyleTwo is available:
You can now change the CSS directly in the BookStyleTwo CSS files, and the changes can be instantly viewed in OBIEE.
This method lends itself very well to dynamic implementations, where changes are required quicker.
The words that you see on the screen can be changed to suit your company.
Let's do a simple example, where we change the title from Business Intelligence to OBIEE 12c Book:
custommessages.xml
.<?xml version="1.0" encoding="utf-8"?> <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1"> <WebMessageTable system="Custom Messages" table="Messages"> <WebMessage name="kmsgHeaderBIBrandName"><TEXT>OBIEE 12c</TEXT></WebMessage> </WebMessageTable> </WebMessageTables>
customMessages
in the OBIPS
folder, that is, C:fmw_bookOracle_homeuser_projectsdomainsbibidatacomponentsOBIPScustomMessages
.custommessages.xml
file into the new folder.
3.146.37.250