Pillai’s

Technology and Everything…..

Archive for March, 2008

Getting Started with Oracle BAM

Posted by Shibu on March 27, 2008

What is Business Activity Monitor (BAM) ? BAM is not a just a tool for reporting or creating executive dashboards. BAM provides the ability to take corrective action in production environment by using real-time operational dashboards and monitoring business process/services or alerts.

Once you install Oracle BAM, you will get four components. You should navigate to the start page which is by default http://localhost:/oraclebm. Once you authenticate yourself using the username/password you used while installation, you will receive the starting page. In this starting page you can see link to Active Viewer, Active Studio, Architect and Administrator.

I will explain how to create a simple report by connecting to an Oracle Database. First step you have to do is to create an external data source. In order to do this, click on the Architect link. Select “External Data Sources” from the top left corner from the Architect screen. You should get screen like below


Click on the Create link. You should get a screen like shown below.
As you can see in the picture enter a name and description for the Data Source. In the Driver field enter “Microsoft ODBC for Oracle”. This should be entered exactly as you can see in the “ODBC Data Source Administrator” screen. Enter user name and password for the Oracle Database. In the Connection String field enter “server=”.

Now that you have created an external data source, you are ready to create data objects.

Choose “Data Objects” and click on create link. You should get screen shown below.
Enter name of the database object as you like. Click on the “External Data Source” and you can choose the database name in the “External Data Source”. Type in the actual table name in the “External Table Name” field. This should be the actual database table name.
Then click on “Add a field” link and enter proper values for the database table field. External Field Name should be same your database table field name.

You are set to start creating a new report in BAM. What I have done is created a view which shows sum of amount for different countries.

On the start page of BAM, click on “Active Studio”
You should get window like shown on the left side. This shows different templates. You can choose the one that fits your requirements. I have chosen a simple one, first template. Click on the first icon. You can click on the top and enter a title. From the different icons click on “3D Bar Chart”. You will get a window like one shown below right side.

You can choose the data object that you want for this report. Choose the view you have created for this report and press next button. You will get window like show below left side. Choose the fields you want to group by and the fields you want to show as the chart values.

Press next button and you should see your report. If you have created view appropriately you should get a chart like one show on the right side.

Advertisements

Posted in Technology | 1 Comment »

ESB Endpoint Virtulizations

Posted by Shibu on March 26, 2008

If you are using Oracle BPEL and ESB you might be wondering when and where ESB should be using? or What is the value addition of using ESB over BPEL.

Well, one of the many advantages is endpoint virtualization. Suppose that you have a BPEL process and it invokes a database procedure from a legacy application using database adapter. Most likely you will have an assign process before the invoke process to map input variables to the variables used by the partner link that invoke legacy system (as shown in the figure)
In this case BPEL Process is bound to the endpoint that communicates with the legacy system. Using ESB we can avoid this dependency make BPEL transparent to the endpoint. In this way BPEL can concentrate on Business Process and not worry about protocol transformation.

Most of artifacts in the BPEL can be reused. So using the WSDL file used for the partner link in BPEL create a ESB Service. You should have a perfect clone of the partner link as the new ESB System

You should have image as shown on the left side. Now that you have created the ESB process you have to create routing service to expose these two operations Update/Delete to outside world. Routing service will talk to the outside world using a partner link like in BPEL. I have attached diagram for routing service. (Please note that I made a screen print of the diagram and modified using <a href=http://www.gimp.org”>Gimp</a> for clarity)

Routing Rules

Now BPEL will be interacting with infrastructure end point as ESB stays within the infrastructure. Thus Actual endpoint is virtualized behind the infrastructure endpoint by ESB which is hot pluggable.

 

 

Posted in Technology | Leave a Comment »

Why SOA is Successful?

Posted by Shibu on March 20, 2008

If I try to explain SOA or define what is SOA, I think it is just waste of my time and your’s too (if you are reading this post!!). Because, I think anyone in IT industry might have at least heard once, what is SOA or what it can do? I just want to dig into the evolution of SOA and figure out how it became the current BUZZ.

The technologist’s quest for interoperability has its roots way back decades ago. Industry leaders and researchers are constantly trying to find a solution where communication between different computer system is possible without loss of meaning. By meaning, I meant data should be interpreted by the same way in all systems. This effort of companies resulted in the paradigms, OMG’s (1991) Common Object Request Broker Architecture (CORBA), Javasoft’s JAVA/ Remote Method Invocation (RMI) and Microsoft’s Distributed Component Object Model (DCOM)

Have you ever thought why CORBA did not become popular? I agree that it did not had the flexible standard interface language (XML) which currently is the basis of SOA. CORBA uses IDL (Interface definition language) which can be mapped to a number of existing languages. CORBA enabled distribution of objects implemented in a variety of programming languages using IDL. CORBA was much supported by Oracle and Netscape. DCOM was supported by Microsoft.

Technology world is ruled by big corporations like Microsoft, IBM, Oracle and SUN. So for any standard/technology to become popular it needs the blessings from these corporations. When Microsoft and others differed in their architecture for distributed computing, other vendors where in limbo as which technology their product should base on. You can see the same issue today with the DVD formats, if it is Blue Ray or High Definition DVD? After Wal-Mart pulls out all High Definition DVD’s from its store in June’ 08, do you think HD DVD supporters can survive? of course it will die.

I guess this is exactly what is behind the success of current SOA. Once Microsoft agreed on and started support on WebService with other major players like Oracle, IBM and Sun, this became widely accepted by all other vendors. Other vendors can confidently market their product based on SOA as it will most probably accepted by their client!!

Posted in Technology | Leave a Comment »

String to Fields – Converting CSV file to Table Data

Posted by Shibu on March 17, 2008

Recently in one of my project’s work I had to read a csv file and insert into Oracle database. Though sql loader is an option I had to use PL/SQL as we have to do some processing before inserting into the table.

So initially each record from the file is read and inserted into a temporary table. This table just has one Varchar2 field and few other fields to hold the metadata. Basically each record from the file is inserted as a Varchar2 field in this generic table.

I created a function which will receive one record as a parameter and then split the string into individual fields and populate an array of strings.

If you are interested in, following is the source code:

Declare
type v_array is table of varchar2(300) index by binary_integer;
in_string VARCHAR2(2000);
v_index NUMBER := 0;
v_data_array v_array;
o_index NUMBER := 0;
i NUMBER;
BEGIN
— Assign a value to the string for test purpose
in_string:=”;
WHILE 1 0
THEN
v_index := v_index + 1;
END IF;
IF SUBSTR (in_string, v_index, 1) = ‘,’ OR v_index = 0
THEN
/* We have to process one field here */
— Get data into the first array */
— Increment index of result array here
o_index := o_index + 1;
v_data_array (o_index) := ”;
WHILE 1 = LENGTH (in_string);
v_data_array (o_index) :=
v_data_array (o_index)
SUBSTR (in_string, v_index, 1);
— we will exit this loop when we find next , character or the end of input string
END LOOP; — for end of each field
— if it is not end of string we should reduce index by one otherwise we will miss next field !!!
IF v_index = LENGTH (in_string); — exit when last characte of the string is read
END LOOP; — for the string
END;

Posted in Technology | Leave a Comment »