Saturday, January 30, 2010

Using Java Embedding Task

Peter Ebell has written an excellent article "Embedding Java in BPEL process" which explains the inner details of how BPEL engine invokes the java classes.

Another article "How to deploy Java classes with BPEL process" goes through the deployment process.

The System.out.println output can be found in the console.

Here is a sample code that outputs the request of type Element to an XML String.

Note : Debugging the problem is a time consuming activity.

try{

System.out.println("IN JAVA EMBEDDING*******************:");
org.w3c.dom.Element inputElement = (org.w3c.dom.Element)getVariableData("inputVariable","payload","/client:process");
System.out.println("*******************GOT THE ELEMENT:*******************");
String inputElementXML = com.collaxa.cube.xml.dom.DOMUtil.toXML(inputElement);
System.out.println("inputElementXML :" + inputElementXML);
setVariableData("outputVariable", "payload",
"/client:processResponse/client:result", inputElementXML);
}catch(Exception e){
System.out.println("Exception in Embedded Java:" + e.toString());
}

Friday, January 29, 2010

Processing request or response as String but with XML structure in BPEL

When the process has been designed(bad design as it is not bound to schema) to accept the request as a String which is in XML format, then development becomes difficult. Oracle BPEL has been developed to deal with request and responses that are bound to schemas and so offer rich XML data manipulation.

Let us see what needs to be done when the request is receved as a Strng in XML format. The string needs to be mapped to an XML element to simplify the processing of payload
  • Use oraext:parseEscapedXML() to read the XML to an Element. If you encounter any problem in this please check the namespace as suggested here.
If the request to another webservice needs to be in a String format(again bad design) then let us see the available options
  • getContentAsString() converts the XML to string but escapes the '<' but leaves the '>' intact.
  • oraext:get-content-as-string() converts to XML but escapes both '<' and '>'. In em console, view the raw xml. If you view in the HTML it looks fine. 
  • Use Java Embedding(this is covered in a separate blog)

Friday, January 22, 2010

Java Web Services : Metro vs Axis

IBM has an excellent article covering the performance of Metro and Axis2 frameworks here. See how Axis2 slows when the payload is encrypted or signed. It looks like this performance hit is beyond the binding and could happen even if JAXB binding is used.

Following are excellent articles written in this series about Metro

Thursday, January 14, 2010

Top 10 reasons to move to Oracle SOA Suite 11g

Ths article summarizes the top 10 reasons why one should move to Oracle SOA Suite 11g. Please note that this comes from an Oracle insider.

SOA BPEL 11g examples

Some BPEL examples based on SOA Suite 11g developed by the SOA/BPM development team are available here. Download the zip, extract the files and open the example in JDeveloper11g. Deploy and test them.

 
Note: The documentaton is minimal but the examples can be understood by going through the code and running them.

Tuesday, January 12, 2010

Career Survival Kit : What every developer needs to know?

This is a must read for every developer. I shall call this as a Survival Kit for IT Developer in any economy.

The video from Jared Richardson is available at http://qik.com/video/1009098

This has been condensed as an article by a gentleman and is available as Career 2.0: Take control of Your Life 

Wednesday, January 6, 2010

Performance Tuning of Oracle BPEL

Following are the list of articles that are worth going through to improve the performance of BPEL
The primary areas to look for performance tuning are below. Sometimes, it is a tradeoff between performance, reliability and security and the decision has to be made after carefully weighing the pros and cons.
  1. Oracle Weblogic JVM Memory
  2. Dehydration Store Database Performance Tuning
  3. Should the process be stored in the dehydration store? By default the value is set to true so that there is no dehydration done. Set the idempotent flag to false if you need the process instance to be dehydrated.
  4. DB Connection Pooling
  5. InvokerBean thread value. By default it is 1 thread per process. But, if there are multiple branches/flows in the process this could be increased so that the processing is faster. Check the 'Dispatcher Invoke Threads' and 'Dispatcher Engine Threads' values.
  6. Logging
  7. Set Audit Level to 'Production'. Payload is not stored.
  8. Feasibility for the usage of REST service as it is lightweight.
  9. Security : Overhead increases as the level of security gets higher. The overhead directly affects the performance.

Tuesday, January 5, 2010

Unit Testing and Integration Testing with Oracle SOA Suite 11g

This is an excellent presentation on testing.

SOAP vs REST

This is an excellent article by David Chappell.

This article helps to understand why REST ful services are required and how the JSON format is useful for data exchange especially Ajax apps.

BPEL vs Workflow

I liked this article which explains how a BPEL process can utilize a Workflow service.

BPEL Process Manager automates a business process. The part of business process that involves human interaction can be achieved through Workflow. So, BPEL PM being an ochestrator of services can invoke a Workflow Service to accomplish this part.

BPM vs Workflow

There are conflicting articles on the difference between the two. Of all, the one that makes more sense to me is this