Debugging Bpel processes

You could debug bpel processes using different kinds of approaches, such as looking into audit trails, sniffing the soap envelopes with the request- and response message, using junit, using the bpel console, …

In this post I’ll mention the 2 approaches I use the most, namely the bpel console itself and Junit.

Visual Debugging Using BPEL Console

Oracle Enterprise Manager 10g BPEL Control reduces the cost and complexity of deploying and managing your business processes. Visually monitor the execution of each BPEL process, drill down into the audit trail and view the details of each conversation, or debug a running flow against its BPEL implementation.

If you’ve deployed a bpel process, you can test the execution in the BPEL Console: http://server:port/ BPELConsole.

In the screen above you can see the deployed bpel processes on the lef-hand side of the screen. To instantiate such a process and create a test instance you can click on the process name and the below screen will be shown:

In this screen you can test the process by defining your own payload, data to be processed by the BPEL process. To define the payload you can use an html-form, the default screen or you can paste the soap-envelop, an xml-based message into the xml-source textarea. To actually test the instance you just need to click on the ‘Send XML-Message’-button. You can also perform stress tests on the bpel processes to verify if performance problems may occure on peak moments.

When you’ve clicked on the button, the process is instantiated and the following screen is shown:

In the tabbed windows you can have a detailed look at the instantiated process, depending on your requirements:

Visual flow:

The activities that failed, threw an exception, are shown with a red background. Each activity in the visual flow holds all needed information for that specific activity. When you double click an activity, the needed data will be shown in an xml-format, because xml is the standard messaging-format for web services.

Audit instance:

Debug instance:

Debug BPEL Processes via JUnit

As soon as a BPEL process is deployed, the BPEL process lives on as being a web service. The webservice can be accessed by its endpoint, or wsdl location.

On the wsdl-tab of your BPEL Process, in the Bpel Console, you can look-up the end-point of the deployed bpel process = web service.

In Jdeveloper you can define a Web Service Proxy and integrate a Junit-test case for this web service proxy:

package test.proxy;

import javax.xml.rpc.ServiceFactory;

class BPELTest_ServiceTest extends junit.framework.TestCase{
BPELTest_Service myBPELTest_Service;

BPELTest_ServiceTest(java.lang.String name){

protected void setUp() throws Exception {
ServiceFactory factory =
myBPELTest_Service =

protected void tearDown(){
myBPELTest_Service = null;

public void testBPELTestPortprocess() throws java.lang.Exception {
test.proxy.BPELTest_PortType port = myBPELTest_Service.getBPELTestPort();
test.proxy.BPELTestProcessRequest payload = null;
BPELTestProcessResponse response = port.process(payload);
assertEquals(“389”, response.toString());

AL Service Bus – Oracle Enterprise Service Bus

So we have 2 flavors of a service bus, namely the ALSB en OESB which is now repackaged and relincensed into OSB = Oracle Service Bus.

If we have a look at both products we could briefly summarise the big differences in focus of both products. Which actually means, looking back into the past, when BEA and Oracle were separate vendors.

So let’s compare both products, in a really, really short summary ;o)

AL SB = stand-alone pipelining mechanism which supports messaging, other adapters and pipelining of actions (a little bit of a sequential approach)

OESB = dragging-and-dropping of different services based on webservices (SOAP Services) or adapters (file, MQ, JMS, DB, …) + focus on transformation and routing

With the 11g release we don’t talk about the ESB or Service Bus anymore but about the Mediator. The SCA Mediator, which actually is the Oracle Service Bus.

The OSB (Oracle Service Bus) = ALSB + OSB = Best of both products = Best of breed

Oracle Bpel Process Manager – New Features

The latest release of SOA Suite and BPA Suite has been released for a while now, so you’re probably wondering, what’s in it for us …

Well let’s have a look at the new features in Oracle Bpel Process Manager

  • Ability to represent real load, to represent the engine behaviour and to know what’s actually going on. Go to the administration-tab in your bpel control and drill down into pools to have message details => a dynamic page for threading, updated in real-time
  • Statistics are now displayed on process map level and aggregated per process instance => Go to the Analytics-tab in Bpel Control Page
  • To miminize XML Coding errors you now have the ‘Validate XML’-tab in your BPEL Console
  • What about those lost instances, you’ve instantiated a process but you can’t find the instance anymore => Audit trail persistence is moved to a separate thread which will prevent losing all data for a given thread when rollback occurs
  • You want to open up a Service Request for an issue you’re running into, but you need all diagnostics to be able to log the problem properly => Go to the ‘diagnostics’-tab in your BPEL Console to collect support information
  • When you’ve defined your Bpel process and your going through release-management you had to manually update wsdl’s, configuration files, etc. to be able to point to the different environments (development, test, qa, production, etc.) => using a deployment plan you can now deploy your bpel process to any environment without the hastle of manually having to change your process parameters => Take a BPEL Suitcase and go to the deployment plan, in this manner you will define a deployment plan for each environment.

Those are big improvements for as well developers, as administrators and especially for troubleshooting.

Eclipse & Jdeveloper Join Forces – My Bpel-enabled Flex Application

For one of my projects I need to be able to work out a RIA using Flex as the front-end, integrated with bpel processes as the back-end.

To be able to integrate these bpel processes with my flex user interface, I’ve created web service proxy clients in Jdeveloper.

These web service proxy clients can be invoked by flex using RPC or Livecycle Data Services, we’ve chosen for the last, LCDS.

After defining the architectural blue-print, I’m able to start implementing the first bpel process. In this post I will guide you through the different issues I’ve stumbled into during the development-track!

1. Installation-tips/-problems regarding Middletier with integrated BPEL :

  • Tip: Make sure that the version of the Application Server and Bpel Process Manager match the version of your JDeveloper IDE. In my case I’m working with the patched IAS Version and Jdeveloper
  • Tip: When you’re installing an OracleAS Middle Tier you need to make sure you check ‘Configure this as an Administration OC4J instance’ when you want use Enterprise Manager. This is made optional because you can work in a clustered environment, lets say your production environment, where only 1 oc4j-instance needs to server as the Administration environment
  • Problem/Solution: When installing patch on your existing Oracle Application Server you run into an exception when trying to overwrite Apache.exe => this probably means a Virus Scanner is running on your operating system which is preventing Unversial Installer of updating the file.

2. Problem/Solution Development-track, JDeveloper IDE:

  • Problem, ‘Cannot edit WebService proxy after Webservice endpoint url has changed’: I’ve defined my bpel process and web service proxy, but my middletier’s hostname has changed which means the bpel processes’ endpoint changed as well. I’ve manually updated the file, generated for the webservice proxy, and changed the endpoint url to the new hostname. If I try to edit the webservice proxy now, by choosing ‘Edit Handlers and Custom Mappings’, I get a message ‘Could Not Invoke Wizard’. The message points out that the old webservice endpoint is still used somewhere/somehow. I couldn’t find a reference to the old endpoint anywhere in the generated java-files. After some digging I finally found the cause, the webservice_proxy.proxy file. You need to change this file to be able to use the wizard again.
  • Problem/Solution: I’ve defined an XSD-file with default-attributes for my bpel process, this xsd file is validated and my bpel process is succesfully deployed BUT … If I try to create a web service proxy for this bpel process I’m getting a nullPointerException. This exception is actually true because I’ve defined the default-attribute for an xs:element with a ref-attribute, in other words, this xs:element refers to an existing defined xs:element. Solution: Define the ‘default’-attribute on the xs:element definition, using the name- and type-attribute and not the xs-element used to define your complex-type.

3. Problem/Solution Development-track, Eclipse IDE & Flex Plug-in :

  • Problem/Solution: Exception is thrown when you run your flex application ‘illegal override of rtmpChannel’. This error can be due to incompatible project files and eclipse jar-files, as in my case I imported an already existing projet in my new eclipse environment. To solve this issue I’ve created a new flex dataservices project and copied all the jar-files in the web-inf/lib folder into the imported project
  • Problem/Solution: ‘Selected wizard could not be started , Plug-in was unable to instantiate class’; this error occurs when you try to create a flex component. The solution in my case was to recreate my development environment, in other words install eclipse, flex plug-in, lcds again.
  • Problem/Solution: ‘Unable to access UserTransaction in DataService’, this errors occurs when you try to invoke the dataservice you’ve configured in your flex application using lcds. This probably means you need to configure JOTM in your tomcat server, or appliction server environment. Check out:

I will keep you posted!

First steps in developing sexy screens for Bpel Processes … yep that’s right … let’s do some Flex-and-Oracle-SOA Integration

Today I started building my first Flex application using Data Management Services … why Data Management Services I hear you thinking.

Don’t get me started on that topic ;o)

The Flex Data Management Service (FDMS) provides a mechanism to maintain data distributed over the client and server tiers.

The Service supports features such as:

  • Data Synchronization
  • Data Replication
  • Occasionally Connected Clients

Additionally, this mechanism offers the possibility of extended functionality in a couple of areas:

  • Automatic synchronization of multiple clients viewing the same accounts data via server “push”.
  • Automatic re-synchronization of client and server data following a server or communications outage.

Now you know why I would choose for FDMS, indeed less work for me and less code to maintain.

The FDMS will need to communicate with my Oracle BPEL Processes which hold all the nesessary process-flow and business logic. How can I interface Flex and BPEL … well no ifficulty lies in there because every deployed BPEL Process is a Web Service so let’s start interfacing.

This also means I’m working with two IDE’s , one for the front-end and one for the back-end:

  • Back-end: JDeveloper to design the bpel processes and define proxies for these processes
  • Front-end: Eclipse to integrate flex and bpel processes, to define FDMS, ActionScript, mxml-files, …

So I’ve packaged my webservice proxy’s and added them on the classpath of my flex-application. Now I need to define my Assembler-class to be able to hook up the bpel processes with FDMS.

In order to integrate the prototypes client tier with the back-end server tier using Flex’s Data
Management Service mechanism, I need to implement a custom Java “Assembler” class.

The Flex Data Service instantiates the Assembler java class and invokes its methods.

To enable this, two additional things need to be done on the server side:

  • The Web Service Proxy to be called needs to be included in the Flex Data Services classpath.
  • The Flex Data Services configuration files need to be updated with a definition of the
    Data Management Service.

For the client tier I need to define the needed ActionScript objects that will be mapped automatically to the POJO’s used in my Bpel Process (Web Service).

The only downside of this, is the need for defining this one-to-one mapping in an ActionScript object whilst in these days you would use IntroSpection to accomplish this. Now I need to duplicate the object-declaration which is already known in POJO’s as well in ActionScript-objects.

Untill now I’m defining all the needed ActionScript-objects manually, aren’t there any generators available for this monkey-task, and afterwards I can start building the UI using mxml.