Friday, December 28, 2012

Sending Alerts Using Oracle Business Intelligence Delivers


In this tutorial, you learn how to create alerts in a dashboard.


Overview

Oracle Business Intelligence Delivers (Delivers) is the interface used to create alerts based on Oracle Business Intelligence Answers (Answers) results. Answers is an extremely powerful, ad hoc data query tool that enables you to perform multidimensional analysis in a pure Web architecture.You can use Delivers to detect specific results and notify the appropriate person or group through Web, wireless, mobile, and other voice communication channels.
Delivers works in tandem with Oracle Business Intelligence Scheduler (Scheduler). iBots deliver reports and alerts to end users. iBots are configured and submitted for execution using Delivers. Scheduler is an extensible application and server that manages and schedules jobs. Oracle BI Scheduler supports two kinds of jobs:
Scripted Jobs: Scripted jobs are set up and submitted, using the Job Manager feature of the Oracle Business Intelligence Server Administration Tool. For example, a scripted job can periodically load Oracle BI Server usage statistics into a back-end database. For scripted jobs, Oracle BI Scheduler communicates with Oracle BI Server.
Unscripted Jobs: Unscripted jobs are called iBots. iBots deliver reports and alerts to end users. iBots are configured and submitted for execution, using Oracle Business Intelligence Delivers. Oracle BI Scheduler communicates with Oracle Business Intelligence Presentation Services for unscripted jobs and must be installed and configured to deliver iBots.
This tutorial covers how to use Delivers and Scheduler to create iBots based on Answers results and build alerts that can be sent to user's dashboards or other delivery devices. You learn how to configure delivery devices, add delivery profiles, add alerts, create iBots, and configure Scheduler.



The dashboard you build in this tutorial charts sales for the last 12 months by channel, country region, and product category and provides trend analysis data as well as narrative highlights of categories that have declined in sales in the last month.
t

Prerequisites

This tutorial is only for the Windows environment. In order for this lesson to work successfully, you should:
1.
Complete the tutorial, Creating Interactive Dashboards and Using Oracle Business Intelligence Answers.
2.
Complete the tutorial, Creating the Metadata for BI Answers Using Oracle Business Intelligence Administrator.
3.
Have the correct privileges to configure and install a mail server on your machine. This OBE uses a simple mail server, ArGoSoft Mail Server Freeware, for demonstration purposes only. If you do not have a mail server, follow these steps:
A. You can download this freeware mail server here.
B. Select the Mail Server Freeware agsmail.exe link.
C. Click Save to download the module onto your local machine.
D. Click Start > All Programs > Administrative Tools > Services and stop the Simple Mail Transfer Protocol Service (SMTP). Close Services.
E. Navigate to the directory where you stored the downloaded freeware module and double-click the agsmail.exe icon. Follow the vendor instructions for installation. This should not take much longer than one minute as it is a very light install.
F. Start the ArGoSoft Mail Server service by double-clicking the ArGOSoft Mail Server Freeware  icon stored on your desktop.
G. Click Tools > Users on the menu bar. When the User Setup window appears, click the New User  icon.
H. The Add New User window appears.
1) Enter user in the User Name text box.
2) Enter Delivers User in the Real Name text box.
3) Enter user in the Password and Confirm Password text boxes.
4) Enter user@<yourmachine> in the Return Address text box, where <yourmachine> is the name of your machine domain configuration.

5) Click OK.
6) Click Close.
I. Click Tools > Option on the menu bar. The Options window appears.
1) On the General tab, enter <yourmachine> in the Local Host text box.

2) On the Local Domains tab, enter <yourmachine> in the available text box and click Add.

3) On the Ports tab, ensure that SMTP is set to 25 and POP3 is set to 110, both defaults.
4) Click OK.
J. Launch your email client. This OBE uses MS Outlook Express. Ensure that all user properties correspond to the information annotated above. To do so, perform the following steps:
1) Select Tools > Accounts on the menu bar. The Internet Accounts window appears.
2) Click Add > Mail and enter user into the Display Name text box.
3) Click Next.
4) Enter the same email address that you used above, user@<yourmachine>, and click Next.
5) Enter the email server names, <yourmachine>, for both Incoming and Outgoing servers, POP3 and SMTP respectively. click Next.
6) Enter user into both Account Name and Password text boxes and click Next.
7) Click Finish. Your account is setup.
8) To check the properties for user, click Tools > Accounts, select user and click Properties. The General and Servers tabs should look like the image below:
Note: Screen captures for this tutorial were taken in a Windows XP environment, therefore Start Menu options may vary slightly.


The following is a list of hardware and software requirements:
Supported Browsers include:
- Microsoft Internet Explorer 6.0
- Microsoft Internet Explorer 7.0
- Firefox 1.5.x
- Firefox 2.0
- Mozilla 1.7.x
- Netscape 7.2.x
Client Operating Systems:
- Microsoft Windows 2000 Professional with Service Pack 3 or above
- Microsoft Windows 2003 Professional with Service Pack 1 or above (32-bit only)
- Microsoft Windows XP Professional with Service Pack 1 or above
Server Operating Systems:
- For Oracle BI Server: Microsoft Windows 2000 Service Pack 4/2003 Server
  

Configuring Scheduler Tables

In this topic you create the Scheduler tables. To deliver iBots, the Scheduler must be configured and four tables must be created and populated with information from the Scheduler jobs. These tables store information about a job instance, parameters, and the schedule. These tables are S_NQ_ERR_MSG, S_NQ_INSTANCE, S_NQ_JOB, and S_NQ_JOB_PARAM.
To configure Scheduler tables, perform the following steps:
1.
To enable the Oracle BI Scheduler, certain tables need to exist to store information. The Scheduler, in turn, monitors these tables and performs any necessary actions. These tables store information about a job instance, parameters, and schedule. For a stand-alone environment, you run SQL scripts to create the tables.
Click Start > All Programs > Oracle-OraDB102 > Application Development > SQL Plus.
Log on using the following credentials, and click OK:
User Name:
sh
Password:
sh
Host String:
orcl
2.
In Oracle SQL*Plus, enter the following string at the SQL > prompt to run the batch sql file:
start <InstallDrive>\oraclebi\server\schema\sajobs.oracle.sql;
Verify that the tables were created by entering the following string at the SQL > prompt:
select table_name from user_tables where table_name like 'S_NQ%';
3.
Enter Exit at the SQL > prompt to close Oracle SQL*Plus.


Configuring Scheduler

Now that you have created the tables for storing information about Scheduler jobs in the SH database, you need to configure Scheduler. You set Scheduler configuration options in the Job Manager Configuration dialog box, a feature of the Oracle Business Intelligence Administration Tool (Administration Tool). Note: You can access the Job Manager tool directly from the Oracle Business Intelligence start menu or through the Administration Tool.
To configure Scheduler, perform the following steps:
1.
Click Start > All Programs > Oracle Business Intelligence > Job Manager.

Job Manager appears.
2.
Select File > Configuration Options.

The Scheduler Configuration dialog appears.
3.
Enter the appropriate information as follows:
A. Select the Scheduler tab. The Database sub-tab shows connection pool information and database table names. Enter the following values in the appropriate text boxes:
Database Type:
Oracle 10g R2
Call Interface:
OCI 10g R1/R2 ( Note: The machine running Oracle BI Server must use the Oracle Call Interface (OCI) to connect to the database.)
Data Source Name:
orcl
Username:
sh
Password:
sh
Confirm Password:
sh
Verify that your values are the same as those that appear in the screenshot.
B. Click the General sub-tab and enter Administrator in the Administrator NameAdministrator Password, and Administrator Password Confirmation text boxes.
4.
Next you configure your local mail server. It is critical that you specify the SMTP server that delivers your mail.
Note: As this is a standalone installation for demonstration purposes, for this iteration only the Microsoft SMTP service is stopped to ensure that the ArGoSoft Mail service works properly.
Click the Mail tab and verify that all text boxes correspond to those in the screenshot below replacing the domain name with yours as required.


Click OK to close the Scheduler Configuration window. Exit the Job Manager and the Oracle BI Administration Tool.
5.
Click Start > All Programs > Administrative Tools > Services and start (or restart) Oracle BI Scheduler.



Creating and Delivering an iBot

Oracle BI Delivers uses intelligence agents or Web robots, called iBots. iBots are software-based agents driven by schedule or events (chained iBots) that can access, filter, and perform analytics on data based upon defined criteria. iBots provide proactive delivery of real-time, personalized, and actionable intelligence throughout the business network. iBots also provide intelligence from data spanning operational and analytical sources. Upon detection of a problem or opportunity, iBots can determine the appropriate individuals to notify and deliver information to them through a wide range of devices (such as email, pager, PDA, mobile phones, and so on).
When a user creates and schedules an iBot in Oracle BI Delivers, the Oracle BI Presentation Server gathers information about the iBot such as its priority, the intended recipients, and the devices to which content should be delivered. The Oracle BI Presentation Server packages this information and other characteristics into a job, and then informs Oracle BI Scheduler when to execute the job.
This sub-topic shows you how to create a request in Answers and an iBot that delivers an alert to your Interactive Dashboard. Additionally, you learn how to chain iBots together so that the results of one iBot request trigger the delivery of another.

Creating a Request and Adding it to Your Interactive Dashboard

1.
Before you create an iBot and schedule the iBot for delivery, you need to ensure that you are able to create a request and publish the request to a dashboard.
If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In.
The Oracle Interactive Dashboard appears.
Click the Answers link.

The Answers window appears. Select the SH subject area from the panel on the right.
2.
The Catalog folders on the left are replaced by SH Subject Area columns. Create a new request by expanding a sub-folder from the left panel and selecting (single-clicking) each column. The column will be added to the Workspace area on the right panel.

Click the following columns on the left panel: Channel ClassCalendar YearCalendar Month NameCalendar Month NumberCountry RegionAmount SoldGross ProfitMargin %, and Product Category.
3.
To make your request more meaningful, you sort the criteria and add a filter to remove the Middle East region as no data exists for this particular region.
A. In this specific order, click the Sort button  for Calendar Month NumberChannel Class, and Country Region.

B. Next, click the Filter button  for Country Region.

The Create/Edit Filter dialog appears.

C. Click the All Choices link and select Middle East. The Value text box populates automatically. Click theOperator drop-down list and select is not equal to / is not in.
D. Click OK to add the filter to your request. Your request criteria should look like the screenshot below.
4.
Add conditional formatting to the request to accentuate the best and worst performing regions by Year, Product Category, and Channel.
A. Click the Column Properties button  for Amount Sold and select the Conditional Format tab.

B. Click Add Condition.

C. Select Amount Sold.

D. The Create/Edit Filter dialog appears. Select is less than from the Operator drop-down list. Enter 5000 (five thousand) in the Value text box.

E. Click Add > Variable > Presentation. Click OK.

F. The Edit Format dialog appears. Click the Background Color button, select any red color, and click OK > OK.

G. The Column Properties dialog appears once again. Click Add Condition once again, but this time set the Amount Sold condition to display a green color when the value exceeds 100000 (one hundred thousand).

H. The Column Properties dialog should look like the screenshot below.

I. Once you have finished adding the second condition, click OK in the Column Properties dialog to return to the Criteria tab.
5.
Next you set up a pivot table that will ultimately appear on your dashboard.
A. Click the Pivot Table button . Your pivot table work area should like the screenshot below.

Hint: Channel Class, Calendar Year, Calendar Month Name, Calendar Month Number, Country Region, and Prod Category columns should appear under the Rows label. Amount Sold, Gross Profit, and Margin % should appear under the Measures label.
Calendar Month Number was added to the request to enable sorting. For display purposes however, this column is not necessary. Click the More Options button  and hide this column.

B. Next, you need to set up the appropriate layout. Drag Calendar Year and Prod Category to the Pages area,Calendar Month Name to the Sections area, and Country Region to the Columns area (drag this below the Measure Labels).

C. Click the More Options button  for Prod Category and select Start New Page Drop Down.

Your request appears below the Display Results link.
This request shows how well each Product Category is performing across all Regions (except the Middle East), by Channel. By setting up Calendar Year and Prod Category as separate page items, you are able to manage the display. The conditional formatting signals outstanding performance and highlights where improvements should be made.
6.
A. Click Save Request .
B. Click Shared Folders and then click Create Folder.

C. In the Caption text box, enter All Managers and click OK.

D. In the Name text box, give your request a meaningful name and then click OK.
7.
Now you need to prepare the request for display on your dashboard.>
A. Click the Manage Display button . The Compound Layout view appears.
B. Click the X in the upper-right corner for the Table display. This will remove the table view from your request.

Your request should look like the screenshot below.

C. Save your request.
8.
Now you verify that you can add a request to a dashboard.
A. Click the Dashboards link.

A blank My Dashboard appears.

B. Click the Page Options drop-down list and select Edit Dashboard.

The Dashboard Editor window appears. Drag the request you created in Step #7 above from the pane on the left, to the gray workspace area on the right. This gray area is actually a "Section" placeholder.

The Dashboard Editor window should look like this:

C. Click Save. My Dashboard appears with your request.

D. Click the Log Out link and close your browser.


Creating and Delivering a Simple iBot

In the simplest format, an Oracle BI Delivers iBot automatically performs a specified Presentation Catalog request (created with Oracle BI Answers) based on a defined schedule, and examines the results for a specific problem or opportunity. If the specific problem or opportunity is detected in the results, an alert is generated and passed to people who are subscribed to the iBot, using the delivery options specified for each person. The content of the iBot can be tailored for an associated delivery device. For example, content sent to a pager might include only a telephone number, and content sent to a Blackberry device might include an email with more detailed information such as a chart.
When Oracle BI Delivers is enabled, an Alerts section is automatically added to the first page of My Dashboard if one is not manually placed there. In this lesson, you create an iBot that delivers an alert to your Interactive Dashboard and email account.
1.
If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In.
To open Oracle BI Delivers, click the More Products link and select Delivers from the drop-down menu.

The Delivers page appears.
2.
In this step, you setup the device profile for the iBot.
A. Click Edit My Account.

The My Account page appears. On this page, you specify devices to receive the content.
B. Click the Add Email Device link.

In the Device dialog box, enter Email as the Device, select HTML eMail as the Device Type, and enter user@ <yourmachine> for the Address.

C. Click Finished.
The email device appears.
3.
Now setup the delivery profile for the iBot.
A.Click the Add Delivery Profile link.

B. In the Delivery Profile dialog box, enter Dashboard as the profile Name and select Normal as the Content Priority.

C. Click Finished. The profile is complete.

D. Click Finished again.
4.
Now you create the iBot that delivers the request to your dashboard based on a specified schedule.
Click Create New iBot.

The Overview page appears.

Click the General tab (or the General link).
5.
You use the General tab to specify the priority of the iBot and how to send the delivery content. You can set the priority to low, normal, or high. The priority works with the delivery profile for a user to determine the destination for alerts of different priorities.
Select Normal from the Priority drop-down list, Personalized (individual data visibility) from the Data Visibility drop-down-list, and leave Run As blank.

Click the Schedule tab.
6.
You use the Schedule tab to determine when the iBot runs, how often it runs, and when to discontinue running it. iBots can execute based on a specified schedule. You can define a starting date and time for the iBot, a recurrence schedule, and an ending date. You can also create a nonscheduled iBot. This is useful when you want to create an iBot that runs only as part of an iBot chain, or an iBot that is initiated by an external process.
Select the Set Schedule check box. Additionally, select Start Immediately and Recurrence - Once radio buttons.

lick the Recipients tab.
7.
You use the Recipients tab to select the users and groups to receive the delivery content of the iBot.
Select the Me check box.

Click the Delivery Content tab.
8.
You use the Delivery Content tab to specify the type of content to deliver with the iBot, such as a dashboard page or a saved request. You can also specify the delivery format for the content, such as HTML, PDF, XLS, CSV, or text.
You can include a short, descriptive headline with the content. The headline appears as the subject when the iBot is delivered. You can add a text message to provide context for an iBot attachment. You can personalize this headline or text message by using a repository variable, a session variable, or a presentation variable. If the delivery content is blank (no records are returned), you can add an explanation for this condition (only applies for conditional requests).
A. Enter My Request in the Headline text box and then click Select Content.

B. The Choose Delivery Content window appears. Select the request that you saved above and click OK.

The Delivery Content window reappears with your request specified.

C. Click the Destinations tab.
9.
You use the Destinations tab to specify a range of desired devices and destinations for iBots. There are two User Destinations: Interactive Dashboard and Active Delivery Profile.
If you choose Interactive Dashboard, the active iBots will appear in a Dashboard Alerts! section as well as on the Alerts!page. A link to this summary appears together with the application navigation links when new iBots are delivered.
If you choose Active Delivery Profile, iBots will be sent to specified devices in the active delivery profile. The active delivery profile is configured through the My Account page. The available devices include: email, pager, digital phone, handheld device, and other devices.
Click both Interactive Dashboard and Active Delivery Profile check boxes.
10.
Finally, you need to save the iBot and verify that the request has been delivered to your dashboard and to your email account.
Click the Save button and name your iBot, My Request iBot.
11.
Click the Dashboards link.
Your request appears in in the Alerts! area of the Interactive Dashboard and an Alerts link appears in the My Dashboard banner.

Click the My Request link to view your report from the dashboard. Your request appears.

Alternatively, you can click the Alerts! link in the My Dashboard banner to view the request, open the iBot, or clear the alert.
12.
Click Start > All Programs > Outlook Express.
Your request appears in your Inbox. If you do not see your request, click Send/Recv. (Note: In this screenshot Preview Mode is enabled for Outlook Express, allowing you to view the request without opening the email.)

Close Outlook Express.

Creating and Delivering a Conditional iBot

You use the Conditional Request tab to select a request to trigger an iBot. In this sub-topic you create an iBot that is triggered based upon a database condition rather than a time condition as in the sub-topic above.
1.
If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In.
A. Using the knowledge and skills that you learned in the sub-topic, Creating a Request and Adding it to Your Interactive Dashboard, create the following request:

B. Only select the most current year (Calendar Year = 2001).

C. Add a condition to the measure, % Chg Amount Sold MAgo, that will display the value in red when the "change percent for last month" is less than or equal to 3. This database condition will trigger a request that displays Product Categories with sluggish growth.

Your request should look like this screenshot:

D. Save your request as % Change in Sales from Last Month in the shared folder named All Managers.
2.
Open Oracle BI Delivers by clicking the More Products link and selecting Delivers from the drop-down menu.
The Delivers page appears.
3.
As you created a delivery profile for the iBot in the prior sub-topic, you can now simply click Create New iBot.

The Overview page appears. Click the Conditional Request tab (or the Conditional Request link).

The Conditional Request page appears.
4.
You use the Conditional Request tab to select a request to trigger the iBot. If you have filters from originating iBots applied to subsequent iBots, filter values are generated by the conditional request specified on this tab.
A. Click Select Condition.

B. The Choose Request window appears. Select the request that you created in Step #1 and click OK.

The Conditional Request window reappears with your specified request.

C. Click the Schedule tab.
5.
Verify that the Set Schedule check box is selected, and choose the Start Immediately radio button. As this is a monthly evaluation of Product Category Performance, set the recurrence as it appears below.

Click the Recipients tab.
6.
Typically, managers and key staff responsible for monitoring Product Category sales would receive this request. For this practice, you will select only yourself. Ensure that you are the recipient by selecting the Me check box.
Note that if you wanted to allow others to subscribe to the request, you would select Publish for subscription.

Click the Delivery Content tab.
7.
Enter % Sales Dropped Below 3% in the Headline text box and then click Select Content. When the Choose Delivery Content window appears, locate your conditional request in the All Managers folder and click OK.
In the screenshot below, an optional text message is distributed if the request is sent as an attachment (in this case a PDF).

Click the Destinations tab.
8.
Accept the default User Destinations.
9.
Finally, you need to save the iBot and verify that the request has been delivered to your Interactive Dashboard.
Click the Save button and name your iBot, Prod Category Monthly % and click OK.
10.
Click the Dashboard link. Your request appears on the dashboard.


Chaining an iBot

Just as you used the Conditional Request tab to create a conditional iBot, you can further refine the request to trigger another query based on the results of the first request. The results of the request determine whether the iBot sends its delivery content and initiates any subsequent actions as follows in the table below:
If the request does not return any rows, the iBot is not triggered.
If the request returns at least one row, the iBot sends its delivery content and initiates any subsequent actions.
This sub-topic shows you how to chain an iBot based on the results of a request.
1.
If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In.
Open Oracle BI Delivers by clicking the More Products link and selecting Delivers from the drop-down menu.
The Delivers page appears.
2.
Click Create New iBot.

The Overview page appears. Click the Schedule tab (or the Schedule link).

The Schedule page appears.
3.
Verify that the Set Schedule check box is selected, and choose the Set Schedule check box and Start Immediately radio button.

Click the Recipients tab.
4.
> Ensure that you are the recipient by selecting the Me check box.

Click the Delivery Content tab.
5.
A. Enter My Chained iBot in the Headline text box.

B. Click Select Content. When the Choose Delivery Content window appears, select Sales by Calendar Year and Prod Category from the All Managers folder and then click OK.
Ensure that the Send content as drop-down list is set to Device Default.

C. Click the Destinations tab.
6.
Ensure that the Interactive Dashboard and Active Delivery Profile check boxes are selected.

Click the Advanced tab.
7.
You use the Advanced tab to specify one or more actions to execute when an iBot completes. Actions are executed on behalf of each user who is a recipient of the iBot. You can change the default behavior for each iBot action. Actions include the execution of other iBots, custom scripts, and so forth. You can also specify actions to execute either when iBot conditions are satisfied, or when no records are returned.

A. Click Add Action from the "Execute these actions when iBot conditions are satisfied" area and select iBotfrom the menu.

B. In the iBot Properties window, click Browse.

C. Locate and select the Prod Category Monthly % iBot and click OK.

D. Select of current iBot from the Execute for Recipients drop-down list and click OK.

Your chained iBot is added.

E. Save your iBot. Enter My Chained iBot in the Name text box and click OK.

F. Click the Alerts! link to view the chained iBot results.

As previously noted, you can review both iBots, clear the alerts, or review the requests from this window.

If you prefer, you can also navigate to the dashboard and select the iBots from your Alerts! area.



In this lesson, you've learned how to: