Integrating BPEL and BAM in Oracle 11g SOA Suite

0 0
Read Time:5 Minute, 30 Second

Following hot on the heels of a previous article on BAM – Business Activity Monitoring in Oracle 11g SOA Suite – this article will discuss how to integrate BPEL and BAM, more specifically: how to make a BPEL process send ‘live’ process instance execution data to BAM and how to have BAM display these details in a dynamic web-based report. Having created that basic integration, the sky is the limit when it comes to building rich, powerful consoles for monitoring Business Process execution.

We will start humbly: with almost the easiest, simplest BPEL process there is and a similarly trivial BAM Data Object and Report. But the key concepts are here.

I will assume as a starting point that all of the BAM Server, JDeveloper 11g and the SOA Suite run time (part of the JDeveloper 11g install) have been installed and are up and running.

The steps we will go through in this article are:

  1. create a new Data Object in BAM (also the interface between the BPEL process and the BAM Active Data Cache)
  2. create an HelloWorld BPEL process
  3. add a variable sensor and a BAM Sensor action to the BPEL process
  4. deploy and run the BPEL process
  5. verify the creation of instances of the BAM Data Object
  6. create a BAM report based on the Data Object
  7. view the report and watch it update in real time as more BPEL process instances are started


The first step is creation of the BAM Data Object. Login to the BAM Web Application – http://host:8888/OracleBAM/default.htm – and go to the Architect.


Click on Architect:

Click on Create Data Object and fill in the details for the HelloWorldDO Data Object:

The DataObject has three fields that contain respectively the inputParameter sent into the BPEL process, the timestamp of the start of the process instance and the instanceId which identifies both the BPEL Process Instance and this data object.

Click on Create Data Object.

and the object is presented:

What we have now is an interface that external data (event) providers can hook into. We will now continue to create a BPEL process that feeds into this Data Object. Then we will return to BAM to create a Report based on this Data Object that will display the data fed into it.

Step 2 – create an HelloWorld BPEL process

Before we continue and if you have not already done so, create a BAM Server Connection. Do this via File, New and select Connections, BAM

Create the Connection in the Application Resources.

The username is fmwadmin and the default password is welcome1.

Test the connection and upon success, press Finish.

You have to make sure that you have only one BAM Server connection.

In JDeveloper 11g, create a new Application with SOA technology template. Create a new project, call it for example HelloWorldBPELandBAM. Open the SOA Composite. Add a BPEL Component to the composite.

Note that  this is a simple synchronous process.

Press OK.

Double Click the BPEL component to start adding details to the process definition.

Add an Assign step.

Edit the Assign Step. Set the output parameter to the string concatenation of Hello and the input parameter.

Step 3 – add a variable sensor and a BAM Sensor action to the BPEL process

In the structure window for the BPEL process, locate the node Sensors\variable and click on the create icon.

Edit the properties to the new sensor, in particular the name and the target – the input element in the inputVariable.

Press OK.

In the Structure Window locate the node Sensor Actions and click on the create icon. Select BAM Sensor Action from the dropdown list.

In the window that pops up, type the name for this BAM Sensor Action.

Browse for the BAM Data Object this sensor action will feed into – the HelloWorldDO object.

Select the Insert operation. Select _instanceId as the Selected Key. You may want to change the name of the XSL Mapping file that will specify the mapping from data in the BPEL process (instance) to the DataObject, for example to bam\InputToHelloWorldDO.xsl.

Press the icon to create the mapping file.

In the Mapper connect the appropriate elements in the Header and the Payload to the BAM DataObject.


Close the Mapper, save all and we are done creating the BPEL process.

Step 4 – deploy and run the BPEL process

Select Deploy …. to Bundled OC4J Server from the RMB menu on the project. Make sure that the Bundles OC4J server is running when you do this.

Open the SOA Console, locate the HelloWorldWithBAMSensors component and start an instance.

Enter a value for the input parameter and press the Invoke button.

After some time the synchronous BPEL process will return its response:

And if all is well, it will have sent out signals to the BAM Server as well.

Step 5 – verify the creation of instances of the BAM Data Object

Return to the BAM Server.  Click on the Contents link on the Data Object overview page. The page will refresh with the current contents for this Data Object. It should now show a single DataObject instance, created from the BP
EL process instance that just return ” Hello Tommy”  to us.

c=”” />

If you feel like it, you can run a few more BPEL Process Instances and find them producing additional DataObject instances.


Step 6 – create a BAM report based on the Data Object

Close the Architect module in BAM. Now start the Active Studio. Click on Create New Report.

Select the simplest Report Layout, shown in the upper left hand corner.

Set the Report’s title to HelloWorld Monitor.

Click on the Streaming List icon to select the View Type. Note: we can later on change the View Type for our Report. A Streaming List presents a tabular display of data that is actively refreshed when new data arrives.

Select the HelloWorldDO as the base Data Object.

Accept all three Data Fields – you can rearrange them if you like.

Press OK to apply the changes. Note: you can very easily go in to edit the Report properties such as display and layout styles, prompts, filters etcetera.

For now we are satisfied. Save the Report and click on View.


Step 7 – view the report and watch it update in real time as more BPEL process instances are started

If we now start some additional BPEL process instances of the HelloWorld process, this report will automatically get updated. We can sit back and relax and watch as new records are added.


About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
0 %
0 %
0 %
0 %
0 %
0 %

Average Rating

5 Star
4 Star
3 Star
2 Star
1 Star

7 thoughts on “Integrating BPEL and BAM in Oracle 11g SOA Suite

  1. This is about SOA Suite 11g which does not run on OC4J and also not on the Integrated WebLogic Server in JDeveloper. You will need to set up a stand-alone SOA Suite 11g run time environment.



  2. Hi,
    awesome .. explanation.. but can u please let me know to deploy the helloworld program in bundledoc4jserver.. i dont find any in the connections tab also.. please guide me its urgent..

  3. oh .. there was an other little issue: with the JDeveloper version I used:, I could not select an ID in step 3 for the Insert operation ! It explained that it didn’t need an Id for the insert operation!
    Kind regards,

  4. Hello Lucas,
    thanks for the example … I excuted all steps, but saw one detail (minor if you know BAM sensors 😉 )
    @step 3: You have to put the BPEL window in Monitor mode (default BPEL), otherwise you will not see the sensor part!
    Thanks for the excellent example!

  5. Excelente!!! Muchas gracias me ha servido de mucho tu post al implementar BAM en mi empresa.

    Gracias por la ayuda y aprovecho para saber si conoces de algún manual para detallar en el diseño de monitoreo BAM???

Comments are closed.

Next Post

JavaOne 2008 kicks off with CommunityOne

The wait is over. The biggest Java show on earth is underway. Well, it is a big event, but it is not just a Java show. This first day – CommunityOne – is much more than Java or even the direct Java eco-system as it is sometimes called. Jonathan Schwartz […]
%d bloggers like this: