Kavin's SOA Blog

April 29, 2009

Using functions in Routing Rules in ESB

Filed under: Development — Tags: , , , — Kavin @ 8:10 pm

Many of the times we get puzzled why the expression looks good but it won’t work in ESB expression. Also some of the functions are not available with expression builder at all. But the fact is that all these functions are available with ESB runtime engine and we should be able to use them in expressions. So for the functions which are visible through expression builder, we don’t need step 1 but for functions like dvm-lookup etc. which are not visible via expression builder we have to build that expressions.

So suppose we want to use dvm-lookup to do routing then we would need to perform following steps:

  • Create XPath Syntax

image

  • Copy expression from “Source” view

image

  • Paste expression in expression builder

image

  • Append the namespace using text editor. You can get namespace from same XSL file from where you copied XPATH expression.

image

image

Once you deploy you should be able to use lookup-dvm (or any other function) within routing rule.

In summary, XPath functions work within ESB routing rule, how you build that expression is totally upto you. As long as you put that xpath function with right namespace you should see results.

NOTE: Using DVM Lookup will affect portability of your code from OESB to OSB (a.ka. ALSB).

April 9, 2009

Prevent ESB from deleting BPEL process upon un-deployment

Filed under: Configuration — Tags: , — Kavin @ 9:18 pm

Sometimes when you redeploy a BPEL process, because of failed deployment or some other glitches BPEL process is not deployed. Now any ESB services pointing to this BPEL process will delete this entry of BPEL process. That means Routing Service will delete routing rules etc.

In a nutshell, if you do not want to delete the process from ESB on undeployment from BPEL, we need to update esb_config.ini file located in <SOA_HOME>/integration/esb/config folder.

bpelSvcAutoDeletion=false

Default value of this property is true (and is not included in esb_config.ini). We are using this to override default behavior.

Once you make this change restart the server and you should be now good to go.

March 18, 2009

Resetting ESB Metadata repository

Filed under: Maintenance — Tags: , , — Kavin @ 10:04 pm

Sometimes ESB repository does not behaves as expected especially after a rigorous DEV cycles or for some other reasons. In order to bring it back to clean, at $ORACLE_HOME/integration/esb/bin directory a script called ‘reset.bat/sh’ is available. This script will cleanup the ESB repository. Simply execute the command as shown below and follow the output.

./reset.sh -DDB_URL=jdbc:oracle:thin:@//db_host:db_port/sid -DDB_USER=oraesb -DDB_PASSWORD=oraesb123

Once you are able to execute it successfully, its very important to restart your ESB instance before using it.

March 10, 2009

Set Adapter end point properties in ESB

Filed under: Development — Tags: , , , , , — Kavin @ 9:52 pm

Most of the time we found documentation referring to BPEL when it comes to set end point properties for adapters. BPEL and ESB share the same and they both can configured with same end point properties. Only thing we need to do is to open respective adapter’s .esbsvc file in notepad and add <endpointProperties> element as shown below.

    </invocation>
    <endpointProperties> 
        <property name="minimumDelayBetweenMessages">6000</property> 
    </endpointProperties>
</service>

Generally you can set endpoint properties “RetryCount” and “RetryInterval” apart from that if you have to add any other property you have to follow the route mentioned above.

I would suggest this trick, simply add any property which is available via UI and then open the file in notepad. This way JDeveloper already created that section and what all I have to do is to edit it with the right property name.

image

image

Get an Instance ID for Oracle ESB

Filed under: Development — Tags: , , — Kavin @ 7:34 pm

A new XPath function ehdr:getInstanceID() was added in 10.1.3.3 to get ESB instance IDs. Please remember there is a separate XPath function ora:getInstanceID() which allows you to get BPEL Instance IDs.

Steps to get this are pretty simple:

Simply add function “ehdr:getInstanceID()” as XPath expression and connect it to target field. XSL Source pasted below.

image

and then, add following end point property in your Routing Service.

enableAccessBusinessEvent=true

image

After this exercise you should be able to capture ESB instance Id which can be a pretty good tool to track/correlate BPEL/ESB.

Older Posts »

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.