Saturday, January 20, 2007

Overule the BPEL instance name

When running BPEL processes, the BPEL consolse is showing the status of the process. This is nice, but when you have hundreds or even thousands process instances, is hard to known for which payload the process instance is running.

A nice feature is to manipulate the title of the process. The maximum length of the title is 50 characters.

Note: in 10.1.3 they change the underlying XML parser. It is now using the Oracle XML parsers. This means that the returned object from getVariableDataI() is not returning a Dom Element but an oracle.xml.parser.v2.XMLElement object.

Create a Java step after the first step in your process. You can use the data of the payload to put this in the title:

<bpelx:exec name="JavaSetTitle" language="java" version="1.4">
Element inVarElem = (Element)getVariableData("inputVariable"
, "payload"
, "/client:HelloWorldProcessRequest/client:input");
String inputdata = inVarElemOrpsId.getNodeValue();
String title = "HelloWorld " + inputdata;
addAuditTrailEntry("New Title is: >" + title + "<");
catch (Exception ex)

10.1.3 example:

String inputvar1 = ((oracle.xml.parser.v2.XMLElement)
, "payload"
, "/client:BPELProcess1ProcessRequest/client:input1")
String title = "Title "+ inputvar1;

Post a Comment