You are on page 1of 19

Enabling Real Time Operational Analytics: Integration between Oracle E-Business Suite 11.5.10 and Oracle BAM 10.1.

2
Open Notifications Operational Dashboard

Technical White Paper November 2005

Enabling Real Time Operational Analytics: Integration between Oracle E-Business Suite 11.5.10 and Oracle BAM 10.1.2

Introduction........................................................................................................2 Oracle Business Activity Monitoring ..............................................................3 Business Event System......................................................................................3 Business Event System and Oracle BAM Integration..................................4 Oracle E-Business Suite Setup ....................................................................5 Create a Queue with the JMS Provider Payload Type ........................5 Create an Agent within the Business Event System ............................5 Create an Event Subscription .................................................................7 Standalone OC4J Setup ................................................................................8 Change the data-sources.xml Configuration.........................................8 Change the application.xml Configuration ...........................................9 Oracle BAM Setup ........................................................................................9 Define or Change the Class Path in Oracle BAM to Include OJMS Libraries..........................................................................................9 Define an Enterprise Message Source ...................................................9 Create a Data Object ..............................................................................12 Design Data Extraction and Consolidation Layer .............................13 Oracle BAM JNDI Setup ......................................................................14 Design Reports ............................................................................................14 Total Open Notifications per Task View............................................15 Total Open Notifications per Workflow and Priority.......................16 Total Open Notifications per User and Priority ................................16 Total Open Notifications ......................................................................16 View Reports................................................................................................17 Conclusion ........................................................................................................17

Enabling Real Time Operational Analytics: Integration between Oracle E-Business Suite 11.5.10 and Oracle BAM 10.1.2

INTRODUCTION

Oracle E-Business Suite provides applications to manage, capture, and analyze an enterprises business operations. In the past, business operations such as customer orders, service calls, and so on have been analyzed via existing Business Intelligence solutions to improve an enterprises business processes. In todays hyper-competitive marketplace, business operations must be monitored in real time also. For instance, on demand manufacturing shops need to monitor suppliers inventory levels and outstanding orders in real time. The global supply chain requires real time inventory monitoring to keep optimum inventory levels of manufactured products. Package delivery firms like FedEx, UPS, DHL, and others need to track packages in real time as this information is as important as the package itself. Todays call center operations are spread across the globe and managing those call centers with optimal call queues to fulfill service level agreements requires enterprises to have real time monitoring and actionable analytics.

Clearly, actionable real time business intelligence solutions provide immense business advantage to an enterprise. Today, Oracle E-Business Suite customers can leverage Oracle Business Activity Monitoring (BAM) (an Oracle Fusion Middleware component) to build that business advantage. Oracle E-Business Suite provides applications across many different business operations dimensions: Human Resources, Finance, Manufacturing, Supply Chain Management (SCM), Customer Relationship Management (CRM), and many others. Sending notifications is a common base activity seen across all of these applications. Some of the examples of notifications are order status notifications, service requisites notifications, order shipped notifications, and so on. Over 10,000 seeded notifications are delivered in Oracle E-Business Suite Release 11.5.10. The ability to monitor, analyze, and take corrective actions (such as vacation planning reassignments or critical notifications reassignments) can offer great business benefits and also can provide visibility around notifications. This whitepaper demonstrates an integration between the Oracle E-Business Suite and Oracle BAM by building open notification reports as notifications are applicable in every application context. These open notification reports are built by collecting notifications data from Oracle E-Business Suite in real time. The following three steps describe the report building process: 1. 2. Publish notification details generated by the Oracle E-Business Suite using the Business Event System. Load notification details into Oracle BAM.

3.

Create an Oracle BAM report based on notification details.

ORACLE BUSINESS ACTIVITY MONITORING

Customer demands and choices have forced enterprises to streamline their business operations and required enterprises to promise 24x7 customer services and SLA (service level agreements). The enterprises themselves need to measure KPIs (key performance indicators) to have real time visibility into their businesses to deliver on SLAs. For example, stockbrokers are promising transaction execution within a minute and FedEx is bound to package delivery dates. Clearly, enterprises need real time visibility into their operations, which can be provided by Oracle BAM, a key technology component of Oracle Fusion Middleware. Oracle BAM also provides capabilities to correlate real time information with business operations that have already happened, hence providing perspective around real time metrics. The core components of Oracle BAM include: Enterprise Link real-time data integration engine to build data flow plans. For example, data from multiple data sources could be aggregated into Oracle BAM with an enterprise link plan. Active Data Cache high-performance, persistent, and memory-based storage system to feed active streaming dashboard reports. Event Engine monitors complex changing conditions in data in real time, based on user-defined rules. Active Report Engine assembles and formats the data for presentation in live reports. Active reports are not static reports, but rather any data change is directly fed into the report. Alerts An alert on a report is triggered based on a rule to start another business process, send an email to a mobile device, or any other corrective measure.

BUSINESS EVENT SYSTEM

A business event is a high-level business activity, which is about to happen or has happened. For example, purchase order created is a business event, which serves two purposes: An integration point for customers to connect with other applications. For instance when a purchase order is created in the Oracle E-Business Suite, update the promised inventory level in a legacy warehouse application. A milestone in a business process that shall be monitored, and analyzed. For instance an operations manager might want to monitor the purchase order pipeline and offer promotions when the order pipeline is not looking good.

Oracle E-Business Suite provides the Business Event System (BES) framework to manage business events. Subscriptions can be registered with the BES framework, which are invoked upon occurrence of the business event. The application behaviors and extensions that can be triggered and extended via BES subscriptions are: Launching an Oracle Workflow process Sending a notification

Executing custom Java or PL/SQL code Publishing the event as a message on a JMS-compliant Advanced Queue

Business event monitoring and analysis provide business insights in real time to the operations manager and executive managers. Business events can denote Key Performance Indicators (KPIs) as well as Service Level Agreements (SLAs). For instance a KPI could be how many orders are shipped, and an SLA could be how long a customer is waiting on the phone to speak with a service agent. These metrics (KPIs and SLAs) can be monitored and analyzed by raising business events around them. An enterprise might have a timebound SLA with customers. For instance, a customer will not have to wait more than 10 minutes to speak with a service agent, which could be at risk if business events around customer, service, and call waits are not monitored and analyzed. Clearly, BES provides the core foundation for real time analysis and optimization of business processes.
BUSINESS EVENT SYSTEM AND ORACLE BAM INTEGRATION

The Business Event System leverages Oracle Advanced Queuing for asynchronous business event processing. So, to monitor business events an advanced queue is leveraged as well to integrate Oracle E-Business Suite with Oracle BAM. When a business event is raised then its event data is pushed to a common queue, which is registered with Oracle BAM and Oracle BES. This same event data is read from the common queue and pushed onto an Oracle BAM report. Open standards were leveraged to achieve integration between BES and Oracle BAM, which are: JMS and XML. The functional architecture is depicted in following diagram:

Workflow Notifications

OC4J

BES
OJMS

Figure 1 Functional Architecture Diagram

Because an open notification was chosen for monitoring use case to build live reports, Oracle Workflow process was created to generate notifications by raising the oracle.apps.wf.notification.send business event. In a production Oracle E-Business Suite instance, the open notifications are generated by numerous business workflows. BES routes these generated notifications to seeded event subscription to generate the notification details and the notification mailer sends these via e-mail to the specified recipients. For further detail, an additional event subscription was defined for the notification business event to publish the notification details as a message onto a JMS compliant queue. Oracle BAM reads the notification message from the JMS queue using OC4Js JMS provider within Oracle Application Server and analyzes the data to show in live reports.

Note: Oracle E-Business Suite provides a preference setting to users to receive notifications in any format. For example a user could receive a notification message in HTML or plain text. This preference controls the notification message body. For this example, HTML e-mail as the e-mail preference was the standard for all users in the Oracle- E-Business instance to get consistent notification XML message bodies. The example demonstrates how to calculate several basic metrics around open notifications. These metrics include: Total open notifications sent per workflow type Total open notifications sent per task type Total open notifications sent Total open notifications sent per priority and user

The remainder of this white paper provides a step-by-step procedure to reproduce the example.
Oracle E-Business Suite Setup
Create a Queue with the JMS Provider Payload Type

In the example, a new queue using Oracle Advanced Queuing (AQ) technology was created. The queue name and queue table name used were called bam_ttq and bam_ttq_tab respectively. Normally, Oracle does not recommend making modifications to Oracle E-Business Suites database schemas, but for this example a queue in the APPS schema was created for convenience. The SQL commands are as follows: execute dbms_aqadm.create_queue_table( queue_table => 'bam_ttq_tab', queue_payload_type => 'sys.aq$_jms_text_message', multiple_consumers => true ); execute dbms_aqadm.create_queue( queue_name => 'bam_ttq', queue_table => 'bam_ttq_tab' ); execute dbms_aqadm.start_queue( queue_name => 'bam_ttq' ); execute dbms_aqadm.add_subscriber(queue_name =>'bam_ttq', subscriber=>sys.aq$_agent('bam_ttq', null, 0), rule=>'1=1'); Note: The APPS schema already has permissions to create, alter, and drop AQ queues, so this schema was used in the test environment for convenience. However, it is not recommended to changing Oracle E-Business Suites APPS and APPLSYS schemas for this integration.
Create an Agent within the Business Event System

The following is step-by-step action list to create a BES agent. 1. To access the Business Event System, connect to the Workflow Administrator Web Applications responsibility as a user with workflow administrator privileges, and choose the Administrator Workflow: Business Events link. Note: Oracle E-Business Suite provides the Oracle Workflow administrator Web pages as a web-based application. Please contact your Oracle E-Business Suite administrator for access to the Workflow Administrator Web Applications responsibility to set up Oracle E-Business Suite for integration with BAM.

2. Select the Agents tab.

3. Press the Create Agent button.

4. Enter the information required to create an agent. For this example, an agent with the following information was created: Name: BAM_TTQ_AGENT Display Name: BAM_TTQ_AGENT Description: This is E-Biz and BAM named communication channel. Protocol: Jms Address: APPS.BAM_TTQ@R11510C1.US.ORACLE.COM System: R11510C1.US.ORACLE.COM Queue Handler: WF_EVENT_OJMSTEXT_QH

Java Queue Handler: Queue Name: APPS.BAM_TTQ Direction: Out Status: Enabled
Create an Event Subscription

The event subscription defines the action that is executed when a business event is raised. 1. Select the Events tab. 2. Enter oracle.apps.wf.notification.send into the Name search field and press the Go button.

2. Press the Subscription button in the Results: Events table.

3. Press the Create Subscription button.

4. Enter the information required to create a subscription. For this example, a subscription was created with the following details: System: R11510C1.US.ORACLE.COM Source Type: Local Event Filter: oracle.apps.wf.notification.send Source Agent: Phase: 120 {Deferred Listener} Status: Enabled Rule Data: Message Action Type: Send to Agent On Error: Skip to Next Out Agent: BAM_TTQ_AGENT@R11510C1.US.ORACLE.COM Owner Name: FND Owner Tag: FND 5. Make sure to enter the qualified agent name as shown in the following screenshot.

This subscription will publish oracle.apps.wf.notification.send business events raised in the Oracle E-Business Suite onto the BAM_TTQ queue.
Standalone OC4J Setup

For this example, a standalone instance of Oracle Application Server Containers for J2EE (OC4J) 10g Release 2 (10.1.2) was installed. The configuration files corresponding to data sources and applications were configured to reference the database schema where the BAM_TTQ queue is created.
Change the data-sources.xml Configuration

Add an entry in <OC4J_Install_location>\j2ee\home\config\data-sources.xml for the Oracle E-Business database. Use the following sample entry, but replace the username, password, HOST, PORT and SERVICE_NAME corresponding to your Oracle E-Business Suite configuration parameters.

<data-source class="com.evermind.sql.DriverManagerDataSource" name="TTTDS" location="jdbc/OracleTTTDS" xa-location="jdbc/xa/OracleXaBamDS" ejb-location="jdbc/OracleEjbBamDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="apps" password="apps" url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS =(PROTOCOL=tcp)(HOST=stank04)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=d b10g)))" inactivity-timeout="30" />
Change the application.xml Configuration

Add a resource provider entry in <OC4J_Install_location>\j2ee\home\config\application.xml as shown here:


<resource-provider name="BAMTTT" class="oracle.jms.OjmsContext"> <description>BAM for Generic</description> <property name="datasource" value="jdbc/OracleTTTDS"/> </resource-provider>

Oracle BAM Setup

For this example, Oracle BAM 10.1.2 was installed on a Microsoft Windows XP machine. Please refer to the Oracle BAM 10.1.2 installation documentation for installation instructions.
Define or Change the Class Path in Oracle BAM to Include OJMS Libraries

Go to the Oracle BAM start page by opening the Oracle BAM URL, http :// <machine name where Oracle BAM is installed>/oraclebam/, and click the BAM Administrator button. Select the Manage Enterprise Message Source Type option in the BAM Admin options on the top left-hand corner of the Oracle BAM Administrator console. Choose the Oracle message source to configure, and change the startup parameters to: JMS*".;<J2EE_HOME>\lib\jms.jar; <J2EE_HOME>\lib\jndi.jar; <J2EE_HOME>\oc4j.jar;<OC4J_HOME_OR_APP_SERVER_HOME>\rdbms\jlib\aqapi.jar;" Replace <J2EE_HOME> and <OC4J_HOME_OR_APP_SERVER_HOME> with your environments installed components. Close the Oracle BAM Administrator console.
Define an Enterprise Message Source

Press the BAM Architect button from the Oracle BAM start page. Choose the Enterprise Message Source option in the Oracle BAM Architect console and create a new EMS (enterprise message source) by clicking create and choosing Oracle (AS JMS and OJMS). For this example, the following details were specified:

Initial Context Factory: JNDI Service Provider URL: TopicConnectionFactory Name: Topic Name: JMS Message Type: Durable Subscriber Name (Optional): Message Selector (Optional): Client ID (Optional):

com.evermind.server.rmi.RMIInitialContextFactory ormi://amanchan-lap.us.oracle.com This is the machine name where OC4J is installed. java:comp/resource/BAMTTT/TopicConnectionFactori es/bam_ttq_tab java:comp/resource/BAMTTT/Topics/bam_ttq TextMessage Istante

ClientID1

Oracle BAM provides built-in tools to parse and transform incoming XML messages through XSLT transformations or XPATH. A sample XML message for an open notification is:
<NOTIFICATIONGROUP maxcount="1"> <NOTIFICATION nid="841082" nidstr="NID[841082/2738525262@WFMAIL]" language="AMERICAN" territory="AMERICA" codeset="US7ASCII" priority="50" item_type="BAMHR" message_name="BAMMSG77" full-document="Y"> <HEADER> <RECIPIENTLIST> <RECIPIENT name="CBAKER" type="to"> <NAME><![CDATA[Baker, Catherine]]></NAME> <ADDRESS><![CDATA[cbaker@vision.com]]></ADDR ESS> </RECIPIENT> </RECIPIENTLIST> <FROM> <NAME><![CDATA[Workflow Mailer]]></NAME> <ADDRESS><![CDATA[WFATGZDB5.emswf.com.emcmail@ap6001oes.us.oracle.com]]></ADD RESS> </FROM> <STATUS>OPEN</STATUS> <SUBJECT><![CDATA[Action Required: BAMMSG]]></SUBJECT> </HEADER>

<CONTENT content-type="multipart/mixed"> <BODYPART content-type="text/plain"> <MESSAGE content-type="text/plain"> <![CDATA[Oracle Workflow Notification Time Zone Pacific Time ______________________Start of Response Template______________________ Response Template for NID[841082/2738525262@WFMAIL] To submit your response, reply to this message, including this response template with your reply. Copy and paste from this message if necessary to obtain an editable copy of the template. Insert your response value between the quotes following each response prompt. BAMAPP BAMAPP: "Approve" Approve Reject ______________________End of Response Template_______________________ Notification Details: &BODY Due Date: ]]> </MESSAGE> <RESOURCE content-type="text/plain" page-type="fwk" src="http:%2f%2fqapache%2eus%2eoracle%2ecom:8475%2fOA%5fH TML%2fOA%2ejsp%3fpage%3d%2foracle%2fapps%2ffnd%2fwf%2f worklist%2fwebui%2fNotifMailerPG%26WFRegion%3dNtfDetail%26 NtfId%3d841082%26dbc%3dap617sdb%5fatgzdb5%26OALAF%3doa Text%26OARF%3demail" enable-stylesheet="N" language="AMERICAN" territory="AMERICA" token="BODY"></RESOURCE> </BODYPART> </CONTENT> </NOTIFICATION> </NOTIFICATIONGROUP>

Continue with the Enterprise Message Source definition and click Add to define the XML to data object mapping. The detailed mapping for an incoming XML message from BES in Oracle E-Business Suite to Oracle BAM is depicted here:

Figure 2 XML to Data Object Mapping

Create a Data Object

A data object in Oracle BAM denotes a data container, which is equivalent to a table in a relational database. The data object in Oracle BAM can have calculated columns based on existing data sets, which was leveraged in the example as well. Choose Data Objects in the Oracle BAM Architect console and click create to create a data object. The layout for the data object used in the example is depicted here:

Figure 3 Data Object Layout

The last three rows are calculated fields used in this example to define the stacked bar chart described in the Design Reports section below.
Design Data Extraction and Consolidation Layer

Oracle BAMs Enterprise Link (EL) component provides the ETL (Extract Transform Load) platform. Go to the Oracle BAM Enterprise Link program folder in Microsoft Windows and launch the Design Studio application. Create a new plan that pulls the message out of BES and loads it into the data object defined in Oracle BAM Architect. Choose an Oracle BAM Enterprise Message Receiver data source from the list of available data sources in EL. Bind this message receiver to the enterprise message source defined in Oracle BAM Architect. In the example, a splitter to put data in the display sink was added as well as the data object defined in Oracle BAM Architect. Drag and drop an Oracle BAM Insert from the list of available data source and connect it to the splitter. Bind the Oracle BAM Insert to the data object defined in Oracle BAM Architect. The following diagram depicts the EL plan to pull information out of Oracle E-Business Suite into the Oracle BAM data object:

Figure 4 Enterprise Link Data Plan

The Grid provides debug capabilities when the plan is updated manually. For this example, the following options were set to Always to continue running the plan indefinitely: Restart on failure Restart on completion

Oracle BAM JNDI Setup

Create or modify the jndi.properties file in <ORACLE_BAM_INSTALLATION>\j2re1.4.1_01\lib with the following properties: java.naming.security.principal=admin java.naming.security.credentials=welcome1 (OC4J admin password) These entries should match your local OC4J admin setup. For this example, a standalone OC4J was installed. Please contact your system administrator to determine the appropriate OC4J credentials.
Design Reports Press the Active Studio button on the Oracle BAM start page. Press the Create New Report button as depicted in the following screenshot:

Figure 5 Enterprise Link Data Flow Plan

To recreate the report from the example, the steps are:

1. 2. 3.

Invoke the CREATE A NEW REPORT function. Select a report template. For this example, a title report with four quadrants was selected. For each quadrant, pick a view template. Some sample report templates are depicted in the following screenshot:

4.

Pick the data object that contains the notification data as depicted in the following screenshot.

5. 6.

Click Next and define the options for the view. Click Finish.

For this example, four different view types were crated with the following options:
Total Open Notifications per Task View

View type: 3D Pie Chart

Total Open Notifications per Workflow and Priority

View type: 3D Bar Chart

Total Open Notifications per User and Priority

View type: 3D Bar Chart

Total Open Notifications

View type: Dial Gauge

Save the report after designing all the four quadrants of the report.

View Reports

Using the Active Viewer component, a user can see the active streaming data in the report. Launch Active Viewer from the Oracle BAM start page. Any time there is a new open notification that gets pushed onto the BAM_TTQ queue; Oracle BAM pushes the change to the report as analyzed information. The following picture depicts the dashboard built for this example:

Figure 6 Open Notifications Dashboard CONCLUSION

Oracle E-Business Suite customers can build real-time monitoring and analytical solutions by leveraging integration between the Business Event System and Oracle BAM to provide enterprise wide operations, KPIs, and SLA visibility.

Enabling Real Time Operational Analytics: Integration between Oracle E-Business Suite 11.5.10 and Oracle BAM 10.1.2 November 2005 Author: Arun Manchanda Contributing Author: Chuao Wang Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 www.oracle.com Copyright 2005, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, and PeopleSoft, are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

You might also like