Oracle Business Activity Monitoring (BAM) is a widely used BI tool within the Oracle Fusion Middleware stack. It provides data gathering and reporting functionalities in order to provide business executives insight into their business processes. Besides using BAM standard reports for business process monitoring, it is possible to define custom data objects and reports. In Oracle SOA Suite 11g a common approach to push data to BAM 11g is the BAM Adapter provided by Oracle. It is a standard SCA technology adapter which simplifies integrating SCA components with BAM. Unfortunately, the adapter was removed in BAM 12c.

This article is going to present an alternative approach using JMS queues and Enterprise Message Sources (EMS) in order to push data to BAM 12c in SOA Suite 12c. In fact this approach can be used with any client capable writing to JMS queues.

Using Enterprise Message Sources (EMS) for data object population

Enterprise Message Sources (EMS) is an existing feature in Oracle BAM 11g commonly used when populating data objects in high performance scenarios. In general, it can be described as a specialized JMS adapter within Oracle BAM which maps incoming message payloads to data objects. In addition, it provides data transformation based on XSLT and error handling capabilities.

Within this article we use EMS to push some person related master data into BAM 12c. The following data object is going to store the person related data.

Person Data Object

Person Data Object

As one can see a person data record includes first_name, last_name, age and country_of_birth as relevant data. The first step in order to push data to this data object is to define a JMS queue which can be processed by an EMS. In this article a dedicated JMS Server and Module were created.

BAM JMS Server

BAM JMS Server

BAM JMS Module

BAM JMS Module

BamEmsQueue will be configured as JMS queue within the new EMS in BAM 12c. Therefore, its JNDI Name bam/ems/bamEmsQ (1) will be required at a later stage.

In order to push data to BAM 12c a JMS message is inserted into BamEmsQueue. The message format has to be defined in order to be able to map it to BAM data objects. The following screenshot shows a possible message format that can be used to populate Person data object columns.

Message Payload

Message Payload

In this definition one can see three important values that are required in order to define an EMS in BAM 12c. First of all, the targetNamespace (2) value is required in order to enable an EMS to select the correct XML node. Secondly, the node itself is defined as Person element of type PersonType (4). Finally, PersonType defines four XML elements (3) that represent BAM data object columns.

Creating an EMS in Oracle BAM 12c

After preparing the required JMS infrastructure and message definition it is possible to create an EMS in Oracle BAM 12c. Therefore, one has to access Oracle BAM 12c Composer and navigate to the Administrator view. Within this view the Enterprise Message Source node in the navigation tree on the left hand side must be selected. In order to start EMS configuration name and display name have to be provided within the upcoming dialogue.

EMS Creation

EMS Creation

By clicking on the Create button a new EMS artifact is created and has to be configured. For this purpose a new tab opens which is used to configure basic properties like the JMS Queue to read from, JMS Message configurations and metadata to enable EMS to select correct XML nodes. In addition features such as error handling and batching can be configured.

EMS Configuration Step One

EMS Configuration Step One

For this article only the JMS connection and XML node metadata information have to be configured. As one can see in the screenshot above, required fields were highlighted in red boxes and mapped to corresponding values mentioned earlier in this article. The required fields and values are:

Topic/Queue Name – bam/ems/bamEmsQ

Message Element Name – Person

Message Element Namespace – https://www.esentri.com/bam/test/person/v1

In addition, the BAM data object has to be selected and its columns have to be mapped to corresponding JMS message XML nodes. This task is done on the bottom of the configuration screen. The data object can be selected from a list.

EMS Configuration Step Two

EMS Configuration Step Two

Afterwards XML nodes (3) can be mapped to the corresponding data object columns in a table view.

EMS Configuration Step Three

EMS Configuration Step Three

This concludes EMS configuration and it can be saved. Keep in mind that the EMS is not started automatically when saving it.

Inactive EMS

Inactive EMS

It has to be started before it processes JMS messages.

Active EMS

Active EMS

Writing data using the JMS adapter in SCAs

Former steps prepared Oracle WebLogic JMS infrastructure and Oracle BAM 12c to process messages from JMS clients and populate data objects with the contained data. The final step in this article is to develop a simple SCA project that sends messages to BAM.

The SCA only consists of a web service interface, a mediator and a JMS adapter. The interface accepts message payloads of type PersonType which are routed to the JMS adapter using the mediator.

writeToBam Example SCA

writeToBam Example SCA

As message routing and payload assignments within a mediator are basic SOA Suite concepts, only the JMS adapter specific configuration relevant for this article will be pointed out.

First of all, one hast to provide the same JMS Queue JNDI Name (1) used during EMS configuration.

Configure JMS Adapter

Configure JMS Adapter

Secondly, the Person XML element (4) from Person.xsd has to be selected as message payload type. It is the same element which was presented above and used during EMS configuration.

Configure JMS Adapter

Configure JMS Adapter

After deployment the implementation can be tested. In this case the web service is invoked with two test data records (John and Jane Doe).

John and Jane Doe Test Case

John and Jane Doe Test Case

As result the BAM data object is populated with the data and it can be displayed in the data object’s Data tab.

Populated Data Object

Populated Data Object

Conclusion

Although no BAM 12c Adapter for Oracle BAM 12c exists, it is easily possible to populate data objects using Enterprise Message Sources (EMS) and JMS Queues. As this approach was already available in 11g and used for high performance scenarios it is proven and tested.

Links

Oracle JCA Adapter for JMS

Oracle WebLogic Server 12c: Configuring JMS Servers and Destinations

Creating Oracle BAM Enterprise Message Sources