Sunday, February 27, 2011

Redeploying a BPEL process with same revision number is throwing error in SOA 10.1.3.5

I was trying to deploy a simple HelloWorld process and got following error :

<2011-02-09 16:10:26,934> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "domain manager": Error deploying BPEL suitcase.
An error occurred while attempting to deploy the BPEL suitcase file "/u201/soal/oracle/product/10.1.3/soa/bpel/domains/default/tmp/bpel_8916679.tmp"; the exception reported is: P
rocess bpel://localhost/default/HelloWorld~1.0/ is being re-deployed to a Production Server with same revision number.Please modify the revision for the process.

ORABPEL-05250

Error deploying BPEL suitcase.
An error occurred while attempting to deploy the BPEL suitcase file "/u201/soal/oracle/product/10.1.3/soa/bpel/domains/default/tmp/bpel_8916679.tmp"; the exception reported is: P
rocess bpel://localhost/default/HelloWorld~1.0/ is being re-deployed to a Production Server with same revision number.Please modify the revision for the process.

at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:783)
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:464)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

To resolve this issue

Log in to BPELAdmin console


http://localhost:port/BPELAdmin


Check for the value of server mode.


Change it to development and try to deploy your process.


In production mode redeployment with same revision number is not allowed.


The same has been mentioned in the Oracle document

It says

With this release, a new property named serverMode has been added to Oracle BPEL Admin Console. You can set this property to the following values:

production � Redeployment of the process with the same revision is not allowed.

development � Redeployment of the process with the same revision marks the existing instance as stale.

promiscuous - Redeployment of the process with the same revision does not make the instance stale. Work items are migrated.

If you are on a clustered environment, then look for property <property id="productionServer"> in your collaxa.config.xml

It will look something like this

<property id="productionServer">
<name/>
<value>true</value>
<comment/>

Change this value to false as this value will take precedence over the one that you have mentioned in BPELAdmin console.

Once you make the changes try to redeploy and this should work now.

Friday, February 25, 2011

SOA Suite-DIrect Binding.Calling OSB from SOA Composite

In my previous post we saw that how we can use direct binding for calling a soa composite.In this post we will see how we can use soa direct binding to call an osb process

Thursday, February 24, 2011

SOA Suite-Direct Binding-SOA composite to SOA composite

When we call a web service our input request is converted into XML data and is passed on to the request as web service deals with XML only.This is a normal call to use a soap over http ,however when we use direct binding then this intermediate step of converting our request to XML is by passed rather java client directly invokes the service.In this exercise we will show how we can use direct binding to call a soa composite.
We will check this in two scenario first of all we will create an inbound request using direct binding and then an outbound request very much similar to what has been explained in the Oracle document

Create a new bpel process and deselect the Exposed as webservice option.

This will be a simple bpel process with an assign activity copying input variable to output



So my composite and process will look something like this



Now drag and drop a direct binding from component pallete in to the left swimplane of your composite
And in the WSDL url point it to the wsdl of the BPEL process you have just created.
Set your port type and callback port type as per your process.





Now once you select the wsdl and ports say ok and apply now your process will look like this.




deploy this process to your server and go to em console to check that

You will find that the test button is disabled for this process





This is because this is not exposed as a web service so in order to call this composite we again need an outbound service to call this composite so we will now create another process to call this direct binding
Expose this service as web service as shown below




Now drag and drop a direct binding in right swimlane called as external reference



Now in the resource pallete choose the wsdl for your direct web service



Once you will select that you will find that the address and provider url is automatically filled as shown below




Asy ok and Now connect the BPEL process with the direct reference as shown in the composite.

Now go to you bpel process and use an invoke activity to invoke the direct binding.
Use appropriate assign statement and save the project.

So in all you process and composite should look like this.


Deploy this to your server and test it.



BAM report is not getting refreshed automatically

You have created a simple report out of some data objects and the report is not getting refreshed with the live data feed.

This is because we need to do some additional configuration in order to make it work.

following configuration has been suggested in the Oracle document for BAM



51.5.6.4 Using Active Now

The Active Now feature in data filtering enables you to display in your views a segment of the data that is always within a defined time window. As time passes, the view is updated with the data within the defined time interval in the filter. Older data is removed from the view and newer data is added as time passes.

Active Now is available when you choose one of the following comparison expressions:

*

is within a time interval
*

is within the current time period
*

is within a time period

Active Now behaves differently depending on which comparison expression you choose.

When you choose is within a time interval, you can control how often the data is refreshed using the Active Now Interval setting.

For example, if you create a filter using is within a time interval, previous type, 1, Hours unit, and Active Now, set the Active Now Interval to 60 seconds, and the current time is 3:25 p.m., data from 2:25 p.m. - 3:25 p.m. is displayed in the view. When the current time changes to 3:26 p.m., data from 2:26 p.m. - 3:26 p.m. is displayed in the view. Every 60 seconds the oldest minute of data is removed from the view and the newest minute is added.

When you choose is within the current time period or is within a time period, the data is refreshed when the time period changes.

For example, when you create a filter using is within the current time period, the Hours unit, and Active Now, and the current time is 3:25 p.m., only data from 3:00 p.m. - 3:59 p.m. is displayed in the view until the current time is 4:00 p.m. At 4:00 p.m. all the data from 3:00 p.m. - 3:59 p.m. is removed from the view, and data that accumulates during the 4:00 p.m. - 4:59 p.m. time interval is displayed in the view.


So a pictorial view for the same is




Just open the report

Edit and then in View Tasks/options click on Edit View

Now Select Data and then Choose Filter there you will find an option

to select the option Active Now as shown above

Again there are cases where in this Active now button is greyed out

When you are using external data object.This is an expected behaviour as

external data object does not support active data.

Tuesday, February 22, 2011

Moving OSB project from Development to Production Environment

In this document i will discuss how we can move our project from one environment to other.I will take example of a very simple process.A simple File write operation which will write to a particular location in my local folder and then i will import the project in to other server with different location for file to be write.we will create customization file for the same Found in System Administrator of Sbconsole.


Ok lets create a business service for writing data in to particular location.
Log in to OSB console http://localhost:port/sbconsole

Create a session
No create a business service.











Save and activate the change now create a proxy service
























now choose the business service



Submit then save all and then activate the project.

Now test the proxy service with some random input




Now if you will go to the C:\output location in your machine you will see a file has been created.

It will have some random name as in my case it is 1650839931605045641-3be301d.12e56ff03c1.-7fd8
But if you will open the file you will get the content which you have passed
<?xml version="1.0" encoding="UTF-8"?>
<a>arpit rahi</a>

So now our basic setup is complete,Now we will try to migrate this project to other machine where in our output location in not C:/output but I C:/outgoing
Since I am using a single machine I will delete the existing project and reimport it which will essentially be the same what we wanted to achieve but before that we will create a configuration plan for process.
Log in to sb console.

Go to system administration
Create Customization file
And select the process for which you have to create configuration plan




Say create file and it will create a ALSBCustomizationFile.xml which will contain all the details of the existing process

Now check for following tags in the file

<cus:customization xsi:type="cus:FindAndReplaceCustomizationType">
<cus:description/>
<cus:query>
<xt:resourceTypes>ProxyService</xt:resourceTypes>
<xt:resourceTypes>BusinessService</xt:resourceTypes>
<xt:envValueTypes>Service Retry Iteration Interval</xt:envValueTypes>
<xt:envValueTypes>UDDI Auto Publish</xt:envValueTypes>
<xt:envValueTypes>Service URI Weight</xt:envValueTypes>
<xt:envValueTypes>Service Retry Count</xt:envValueTypes>
<xt:envValueTypes>Service URI</xt:envValueTypes>
<xt:refsToSearch xsi:type="xt:ResourceRefType">
<xt:type>ProxyService</xt:type>
<xt:path>default/Caller</xt:path>
</xt:refsToSearch>
<xt:refsToSearch xsi:type="xt:ResourceRefType">
<xt:type>BusinessService</xt:type>
<xt:path>default/FileWrite</xt:path>
</xt:refsToSearch>
<xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources>
<xt:searchString>Search String</xt:searchString>
<xt:isCompleteMatch>false</xt:isCompleteMatch>
</cus:query>
<cus:replacement>Replacement String</cus:replacement>
</cus:customization>

Now here you have to make the changes manually.
This is just an example and may not sound great to you but you can use this for your application which are much complex than this.

Here in our use case we will provide the current folder in search string and will provide the new folder in replacement string so it will look something like this.


<cus:customization xsi:type="cus:FindAndReplaceCustomizationType">
<cus:description/>
<cus:query>
<xt:resourceTypes>ProxyService</xt:resourceTypes>
<xt:resourceTypes>BusinessService</xt:resourceTypes>
<xt:envValueTypes>Service Retry Iteration Interval</xt:envValueTypes>
<xt:envValueTypes>UDDI Auto Publish</xt:envValueTypes>
<xt:envValueTypes>Service URI Weight</xt:envValueTypes>
<xt:envValueTypes>Service Retry Count</xt:envValueTypes>
<xt:envValueTypes>Service URI</xt:envValueTypes>
<xt:refsToSearch xsi:type="xt:ResourceRefType">
<xt:type>ProxyService</xt:type>
<xt:path>default/Caller</xt:path>
</xt:refsToSearch>
<xt:refsToSearch xsi:type="xt:ResourceRefType">
<xt:type>BusinessService</xt:type>
<xt:path>default/FileWrite</xt:path>
</xt:refsToSearch>
<xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources>
<xt:searchString>file:///C:/output</xt:searchString>
<xt:isCompleteMatch>false</xt:isCompleteMatch>
</cus:query>
<cus:replacement>file:///C:/outgoing</cus:replacement>
</cus:customization>



Now if you have a different environment then import it to new one or if you don’t have delete the existing project and try to reimport the project.

Once you have imported the project
Again go to System Administration
Execute Customization file and import the customization file that we have created as shown below






Verify if command is executed and activate your changes



now once you have made the changes now check you business process you will see that the enpoint location has now changed to the new value that you have provided in replacement string.If you will execute the process now it will now log file in the new folder location.

Monday, February 21, 2011

OSB 11.1.1.4

OSB 11.1.1.4 is a separate installation and it doesn't get installed on top of earlier version.

You can download the software from OTN



Software required are

1>Weblogic SErver 10.3.4
2>SOA Suite 11.1.1.4
3>Oracle Service Bus 11.1.1.4
4>RCU 11.1.1.4
5>Database 10.2.0.3+

In my case i am setting up SOA Suite also hence SOA Suite is also required.

The installation step for SOA Suite 11.1.1.4 i have already mentioned in my previous post.



This is basically a continuation of that post.

We will first see how to install OSB 11.1.1.4 and then how to create a domain for OSB.Instead of extending the existing SOA domain,I have created a all new domain containing both SOA and OSB,however we can also extend an existing SOA domain to include osb in it.

Further in my installation i have installed SOA Suite first and then OSB however it is recommended to install OSB first If you are planning to install OSB along with other SOA Suite components.


So here goes the installation screenshots for OSB on top of weblogic server 10.3.4

Download and exxtract the software.Once extracted run the .exe file to start installation.

Once this command prompt will come,Provide the JAVA_HOME For the weblogic server you have installed earlier and enter



























Now to create a domain

Go to MIddleware_home\Oracle_SOA1\common\bin

and click on config.cmd a gui will come up like this














Now here is one important step you need to take care of ,The OSB JMS Reporting Provider by default uses its own DBMS/Services port ans Schema Owner,



Also the database vendor it uses is Derby and you need to change it manually so if you will proceed with default values only you may end up with error like this.



and if you will proceed with this you will get further more error


Component Schema=OSB JMS Reporting Provider
Driver=oracle.jdbc.OracleDriver
URL=jdbc:oracle:thin:@localhost:1521:orcl.idc.abc.com
User=FMW_SOAINFRA
Password=********
SQL Test=SELECT 1 FROM DUAL

Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

CFGFWK-60850: Test Failed!


Though the same SID Was working fine for other schemas,don’t know the exact reason for this issue




A bit of idea on Derby,It is an evaluation database included in weblogic server.

It has been mentioned properly in the Oracle document

http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15017/before.htm#BABCJHDJ




In a development environment, you can use Derby, an evaluation database included in your Oracle WebLogic Server installation. In this case, you are not required to use RCU to create and load schemas if the Oracle Web Services Manager functionality for Oracle Service Bus is not required. Be sure to select Evaluation Database if you are using the Custom installation option to install Oracle WebLogic Server. If you are using the Typical installation option, the Evaluation Database is installed, by default. Reporting tables for Oracle Service Bus are created in the Evaluation Database when the server starts up for the first time. If you are using Oracle Fusion Middleware Configuration Wizard to create the Oracle Service Bus domain, configure the database type reporting as Derby, and set the password appropriately. You can ignore the Test Connections action in the wizard because the Evaluation Database starts only when Oracle WebLogic Server is started.

But since we are not using development environment we will go ahead with the RCU.So we will make some changes in the JDBC Schema connection to point it to RCU and Oracle driver as shown



Please make sure the sid you have provided is correct,As for my case it was strange other schemas were working fine with domain name however OSB JMS reporting provider was not wokring fine with domain name in SID as you can see at my end.













Just in case If you would have proceeded with the default set up(Derby) finally you would have received the following error in your console while starting up admin server as shown.