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());
}

2 comments:

  1. Where can I see output from System.out, please?

    ReplyDelete
  2. Thanks for the information. Surely debugging takes a lot of time.The article by Peter Ebell is excellent and has been written very clearly.
    sap upgrade tool

    ReplyDelete