Monday, 5 December 2011

Simple:Integarting BAM with BPEL in SOA Suite 11g

Integarting BAM with BPEL in SOA Suite 11g

 Hi Friends... In this box we will discuss how to integrate BAM and BPEL with a sample and simple example.
To do this we have to have SOA suite installed along with BAM.(And as usual JDev is required to do the design time development.)

We have two methods to integrate these two. One is with the help of BAM adapter and second one is through sensors.

First we will see the first approach.(with BAM adapter)

Start the Admin server, Managed server and BAM server before starting the development.
Now login to the BAM console.



Here we will see the BAM home page as below. Click on Active Viewer



Now create a data object by clicking on createdataObject link.



Provide the dataObject name and then click on add fields to add elements to the dataObject.



Now finish the creation of dataobject by clicking on createDataObject button.

In JDeveloper create a SOA project (with BPEL component and BPEL can be any type)
Open the composite.xml and drag the BAM adapter to the left swim plane.



Give appropriate name to the service. If you have already a connection to BAM server it will show that one otherwise create new connection by providing BAMserver deatils.
If we expand that connection, we can see the dataObject that we have created in BAMConsole in the previous steps as below.



Select the dataObject and select the operation (for our sample select insert) and NEXT



Now we are in JNDI Name page of configuration wizard. Here we have to provide the JNDI name that is configured in Weblogic Administartion console.



If it is not configured follow the below steps.
Open the administration console by providing the credentials.
Now select the  Deployments and then navigate to Oracle BAM Adapter by clicking next below the Deployments table.



Select configuration and then Outbound Connection pools. Now expand SOAPConnection factory and click on eis/bam/soap



Now it will open below page. Here provide the BAM server details. In the boxes after entering values we have to click enter explicitly.



After entering all values save the changes. After saving the changes we have to redeploy the BAMAdapter which it will show as below.



Now again come to deployments and then Oracle BAM Adapter. Select the checkbox corresponds to Oracle BAM Adapter, which will enables the update button above the table.



Click on the update button then select the redeploy radio button. If we are doing this first time for BAM adapter it will ask us to create Plan.xml. Give the appropriate name and finish the redeployment.

If we click on Oracle BAM adapter and then on General tab it will show a page as below. Make sure that you are providing the same JNDI name while configuring in JDeveloper.



Now in Jdeveloper finish the configuration of BAM adapter and assign required values to the input variable of BAM adapter invoke variable. After completion of these things our BPEL looks like below.



Like other adapters we will get one wsdl, one jca file and one xsd file for this adapter.

Now deploy the composite application and provide the inputs in the em page.



Now open the BAM console and select the dataobject in dataObject pane.



Now click on the contents link in the center area of the page.



We can see the the details as below.




This is the end of first method.

Now we will see the second approach.

In this methode first we have to create sensors and have to create BAM sensor action through which we interact with BAM.

To create sensors see this post.
After creating sensors create BAM sensor action as below.
In structure pane right click sensor actions then create and now select BAMSensor action.



Give name to the action and select the sensor in the dropdown list.



Now by clicking on the torch beside the data object select the object we have created in BAM console earlier.



Select the operation in the dropdown list and double click on each variable present in available key box to make them available. If we want we can change the XSL name otherwise accept the default. In Connection factory JNDI provide the JNDI name we configured above.(as shown in below image). Finish the BAM action creation



It will open XSL we mentioned while configuration. Map the elements as required. In the source side it will give standard structure from the XSD and in target side we will have elements that dataObject contains.



Deploy the composite application and see the results in BAM console.

No comments:

Post a Comment