Sunday, August 02, 2009

BPEL - Java

Coming from a Java/J2EE background, one would think bpel is just drag and drop, however while working on an EAI type project on would definitely need Java. There are three types of Java extension in bpel

1. Custom XSL function for XSLT and XPATH
This fits best for any lookup functionalities, a good article here on how to do it.

The xslt function can return a nodelist, documentfragment, string, date, boolean. Nodelist is proper when a hashmap kind of collection is required. documentFragment can be used to return a dom tree. While calling the function from bpel/assign documentfragment works better.

for error handling, we are wrapping all exceptions as some error code in form of a nodelist.

2. Java Embedding
This fits best for invoking any Java from within bpel, If the Java code is developed in a layered manner, the same code can be used from XSLT or from bpel.

3. WSIF to Java Web Service
This is the web service approach to expose Java as service, and if it is co-located in the same server, WSIF can be used to optimize the call.

From a deployment perspective all the Java code/jar has to be deployed to all servers in a cluster.

No comments: