Technology and Everything…..

Archive for the ‘Technology’ Category

How to extend a VO in Oracle OAFramework

Posted by Shibu on November 10, 2008

Suppose that you want to change the sql in a LOV, how will you do that in oaframework? Ok, first make sure that you did set up your JDeveloper Environment correctly for oaframework. Now enable personalizations. Go to the page which has the LOV that you want to change. Let’s extend supplier lov in the receiving screen in iProcurement. So go to the “Receiving” tab and click on “Return” items. You will get screen like below
Return Items

Return Items

Now click on the LOV “torch” for Supplier field, you should get screen like below.

Supplier LOV

Supplier LOV

In this page click on the “About Page” link at the bottom. Click on the Business Objects and you should get page like below



Now from this screen you should be able to see the VO Name for the LOV. Since we have to change “Supplier” LOV you can figure out that the VO which we have to extend is SupplierAndSiteLovVO

Note the full name of the VO, oracle.apps.icx.lov.server.SupplierAndSiteLovVO. You should have a class named SupplierAndSiteLovVO.class in the directory <JDeveloper Install Directory>/jdevhome/jdev/myclasses/oracle/apps/icx/lov/server

Now in Jdeveloper, click on “Add to <your project name>.jpr….” link in the “Project” menu like below, in my case project name is ExtendLbSolution


When you get “Add Files or Directories to <your project name>.jpr” window, open the server.xml file from <JDeveloper Install Directory>/jdevhome/jdev/myclasses/oracle/apps/icx/lov/server directory. This will create a library in your Jdeveloper project (oracle.apps.icx.server). If you expand this you will see all the VOs and AMs from that directory.

You have to make sure that you have completed these steps before proceeding further.

Now lets extend Oracles’s class SupplierAndSiteLovVO.

1) Now that you have added Oracle library to your project you should get something similar to shown below. Not that I have added oracle.apps.icx.lov.server to my project demo1.jpr



2) Now create a new “Business Components Package”. I created oa.demo so that all my new classes will be deployed in this package. Click on “New” from “File” menu and choose “Business Components Package” like below



3) Now let’s create a new View Object. Like above create a new components and this time choose “View Object” from the “Business Componets (BC4J)” list

4) First you will get the Welcome screen in the wizard click next . Choose oracle.apps.icx.lov.server.SupplierAndSiteLovVo in the “Extends View Object”. Package should be your package name and Name is your package name




Posted in Technology | Leave a Comment »

How to set up your JDeveloper Environment for OAFramework

Posted by Shibu on October 12, 2008

 You can see many notes in metalink as well as many other websites which explains this in detail. However I will just go thru the setups briefly

1)     Download the patch () from Metalink – Note that this patch is just a zip file, you just need to unzip to your directory

2)     Once patch is downloaded click on jdev.exe in from where you unzipped and make sure that you are getting JDeveloper window

3)     You need to download all class files from your JAVA_TOP from the server to desktop. I have downloaded all files, you can just download icx directory. Go to $JAVA_TOP in your server and zip everything from oracle. FTP this zip file to your descktop and unzip to <JDeveloper Install Directory>/jdevhome/jdev/myclasses

4)     Now you have to copy the dbc file from your server to desktop. You should have the dbc file in your server under $FND_TOP/secure directory. Copy the <SID>.dbc file to <JDeveloper Install Directory>/jdevhome/jdev/system9.xxx/oa/dbc_files/secure in your desktop

5)     In JDeveloper, create a new workspace and a new project. Once a project is created, go to the menu “Project” and click on “Project Settings” You should see the screen like below. You should choose your dbc file

Project Settings

Project Settings

6)     You should create a database connection for your server too.

Posted in Technology | Leave a Comment »

How to enable personalizations in Oracle 11i

Posted by Shibu on September 22, 2008

You can enable personalizations at any level. Normally you should enable for a particular person who maintains the personalizations. Set  following profile option to ‘Yes’ to enable personalizations


Personalize Sefl-Service Defn

Posted in Technology | Leave a Comment »

Accessing Oracle Database from Unix Shell Script

Posted by Shibu on August 5, 2008

Many times when you develop shell script for deployment or batch job often you have to check some database field values. I will show you how you can access database field value into unix shell variable.


DB_CHECK=`sqlplus -s user_name/<pass_word> <<EOF

set pages 0

set lines 2000

set heading off

select ‘OK’ from dual;



echo $DB_CHECK

Here you can have multiple line in the select statement. If you have multiple lines you have to put ‘\’ at the end of each line except the last line.

Posted in Technology | Tagged: | Leave a Comment »

Forgot default password for OWSM ?

Posted by Shibu on April 11, 2008

The default password for administration user (admin) of OWSM is oracle. In any case if you are not able to login with that user, you can create a new user with a new password.

Login into the machine where you installed your SOA components. Change your directory to …/owsm/bin. OR just find the file manageUserGroups.properties using command “find . -name manageUserGroups.properties”

Create following entries in the file

user_id=<YOUR USER ID eg: admin1 >
user_name=<YOUR USER NAME eg:admin user name >
user_password=<YOUR PASSWORD eg:welcome1>

group_desc=super user group

Now we will create this user using following commands like below.

wsmadmin.sh manageUserGroups addUser
wsmadmin.sh manageUserGroups  addUserGroup

Try loging with your new user name and password


Posted in Technology | 2 Comments »

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.

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:

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;
— Assign a value to the string for test purpose
v_index := v_index + 1;
IF SUBSTR (in_string, v_index, 1) = ‘,’ OR v_index = 0
/* 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

Posted in Technology | Leave a Comment »

Deploying Oracle BPEL Process to Different Instances Using ANT and Parmeters

Posted by Shibu on December 18, 2007

If you are a Oracle SOA Developer, I am sure you will be using Oracle Jdeveloper for the development of BPEL process. In this Blog I will show you how you can build and deploy your BPEL process from command line using ant. Also I will explain you how you can pass parameters while compiling, so that you can deploy to different servers by using server name as parameter. Also I have used parmater to specify directory locations for the file adpaters used in the BPEL process.

This blog assumes that you already installed JDeveloper and created a BPEL process and deployed to development server using JDevloper.

Open command window by running cmd command. Find out where you have installed your JDeveloper. In my case I have installed it in the D:\jdev10132 directory. This is going to be your ORACLE_HOME. Issue following command from the command window.

SET ORACLE_HOME=d:\jdev10132 (This should be your directory where you installed JDeveloper)

Now make sure the command worked by issuing echo %ORACLE_HOME%

Next you have to set ANT_HOME variable. Issue following command,

SET ANT_HOME=d:\jdev10132\ant

Now you have to include ant in the PATH. Issue following command,

SET PATH=d:\jdev10132\ant\bin;%PATH%

Now type ant you should get message like below
Buildfile: build.xml does not exit!
Build Failed.

(Of course if you have build.xml file in the directory where you are now, ant will try to compile the default target mentioned in the build file and you may get different message)

Next we have to make sure we have all jar files in the ant lib directory. Go to ANT_HOME\lib directory. You should see many jar files in this directory. I am attaching the screen print of the files which I have in my lib directory.

Next we have to make sure we have all jar file in the bpel lib directory. Go to your ORACLE_HOME. In my case it is d:\jdev10132. Next go to integration\bpel\lib directory. Here you should have many files. In my case I had only one jar file here. I will explain you how you can get all required files. If you have already installed BPEL Server then you may have all files. Required files are orabpel-ant.jar, orabpel.jar, orabpel-boot.jar, orabpel-common.jar, orabpel-exts.jar, orabpel-thirdparty.jar, oracle_http_client.jar.

If you do not have these file you can download these jar files from the server if it is installed in different machine. In my case we have our SOA server installed in a linux machine. We installed our SOA server in /d01/orsoa directory. So all the jar files for bpel are in /d01/orsoa/10.1.3/bpel/lib directory. I downloaded all jar files from this directory to the ORACLE_HOME\integration\bpel\lib directory.

Now you have finished all pre-requisite steps.

Find out the directory where you have your application/project saved from JDeveloper. In my case my project files are in the directory d:\oaframework\jdevhome\jdev\mywork\BPELExample\BPELProcess1 directory. BPELProcess1 is my BPEL process name.

So find out where you have saved your BPEL project and cd to that directory in the command window. Just list all files using DIR command. You should see a build.xml file which is created by JDeveloper.

Now we will prepare for our deployment using ant.

As I mentioned before I have a file adapter in my BPEL process which reads file and archives it too. For different servers, the physical directory location is different. So while deploying I want to make the directory location as parameter so that DBA who will deploy to production server will change it accordingly. I will show how we can achieve this.

In Oracle JDeveloper when defining a file adapter you have mention the location of files where it reads from or write to. If you have a file adapter open the file adapter wizard and go to the step where you define the file location. If you notice there is an option “Directory Names are Specified as Physical Path or Logical Name. Choose Logical Name here. In my case I have mentioned input file location as “indir” and archive file location as “archdir”. Choose appropriate names for your case and save all files. Build from JDeveloper.

Now that you have mentioned logical name for your directory, you have to mention the mapping to physical path somewhere right? Oh yeah, let us do that. Go to your project home directory. In my case it is d:\oaframework\…\BPELProcess1. Under this you should see another directory bpel. Open the file bpel.xml in this directory and search for the logical name you used. I will see like below,

JDeveloper created these two for you. We have to mention the physical path here as value. What we will do is introduce two variables here instead of values. These variables can be passed as parameters while compiling using ant. So DBA can supply file location as parameters while compiling and deploying. So I modified these two lines like below,


Save this file.

Navigate one directory above to your project home directory. Here you should have build.xml file.

Create a new file pre-build.xml file in this directory. When you use ant to compile it will first process commands written in this file. We will replace our variables in the pre-build process. So create pre-build.xml file like below,

<?xml version = ‘1.0’ encoding = ‘UTF-8’?>
<project name=”bpel.deploy” basedir=”.”>
<property name=”process.dir” value=”${basedir}”/>
<copy file=”${basedir}\bpel\bpel.xml” tofile=”${basedir}\bpel\bpel.xml.orig”/>
<replaceregexp file=”${basedir}\bpel\bpel.xml” match=”@@archdir@@” replace=”${archdir}” />
<replaceregexp file=”${basedir}\bpel\bpel.xml” match=”@@indir@@” replace=”${indir}” />

As you can see I am replacing the @@archdir@@ using the parameter archdir. Parameter can be accessed using syntax ${ }

Also you might have noticed that I am copying bpel.xml file to bpel.xml.orig. This is because when you deploy using ant command bpel.xml file will be changed. @@@@ will be replaced with the value passed as parameter. So when you try to compile/deploy second time ant will not able to replace as there will not be any @@@@ in the bpel.xml file !!

Now we will create another file post-build.xml file. In this file we will copy the bpel.xml.orig file back to bpel.xml as below,

<?xml version = ‘1.0’ encoding = ‘UTF-8’?>
<project name=”bpel.deploy” basedir=”.”>
<property name=”process.dir” value=”${basedir}”/>
<copy file=”${basedir}\bpel\bpel.xml.orig” tofile=”${basedir}\bpel\bpel.xml”/>

So far we have parameterized directory location for the file adapter. Now another variables needed are server name, port, user name and password. All these will vary from instance to instance. So we have to provide flexibility to DBA to change these during deploying. We will make all these parameters.

Open the file build.properties. Here is where you will mention all these variables.

Uncomment and update following lines like below,


Alright, you have finished all steps for deployment ….Ready? Ok, deploy using command

ant –Dadminuser=administrator –Dadminpass=your_password -Ddephost=your_host_name
-Ddepport=your_port_address -Darchdir=physical_location_of_archiving

If everything done as mentioned, you should be able to deploy your process !!!

Posted in Technology | 2 Comments »