Tuesday, June 18, 2013

Composite Sensors in SOA Suite 11G

Hi Guys,

Its been long since I last wrote blog because of some workload.Eventually took out some time to continue sharing my knowledge.Without wasting any time, Ill start and explain you guys about Composite levels , what are they used for and how to use them.

Composite sensors
provide a method for implementing trackable fields on messages. Composite sensors enable you to perform the following tasks:

  •     Monitor incoming and outgoing messages.
  •     Specify composite sensor details in the search utility of the Instances page of a SOA composite application in Oracle Enterprise Manager Fusion Middleware Control. This action enables you to locate a particular instance.
  •     Publish JMS data computed from incoming and outgoing messages.
  •     Track composite instances initiated through business event subscriptions.

You define composite sensors on service and reference binding components or on service components that have business event subscriptions in Oracle JDeveloper. This functionality is similar to variable sensors in BPEL processes. During runtime, composite sensor data is persisted in the database.

In our use case I have created a One Way BPEL process exposed as web service using below schema:

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<xsd:element name="employee" type="personinfo"/>
<xsd:complexType name="personinfo">
  <xsd:element name="EmpID" type="xsd:string"/>
    <xsd:element name="firstname" type="xsd:string"/>
    <xsd:element name="lastname" type="xsd:string"/>

Inside the BPEL process  we only have receive activity.Our BPEL process will accept the fields defined in schema and thats all we require for this post. 

Step1: To create sensors ,Click the Composite Sensor icon above the SOA Composite Editor
Step2: Composite sensors window will pop up.Click on "+" icon to create composite sensor.
Step3: In the next window, give the name to sensor and define expression to assing value to this sensor.
Step4: You will see the input payload only in our usecase as our BPEL process is one way only.Drill down to Employee ID and click OK.
Step5: Now under sensor actions you will see two options Enterprise Manager and JMS Queue. 
  • Enterprise Manager
Select to make runtime sensor data searchable in the Instances tab of a SOA composite application in Oracle Enterprise Manager Fusion Middleware Control.
  • JMS Queue
Select to store composite sensor data (XML payload) in a JMS queue. You must specify the JMS connection factory and queue name.In our case we will use Enterprise Manager
Step6:Our Composite sensor EmployeeID is created .Click OK.
Step7: Under your projects on left hand side you can see two new files getting created sensor.xml and sensorActiuon.xml. These files contains list of all the sensors configured for particular composite and along with their actions.
Step8: Compile and deploy your code to EM and test the Sensors composite.Pass the values in employeeid,Fname and Lname.
Step9: Now Open up flow trace for the request you triggered.Expand the sensors tab just below Flow Trace.You will see EmployeeID as sensor and its value that we passed in the input.
Step10: Go back to your Composite in EM and go to Instances tab.Just next to Search,Reset Buttons you will see a new button :AddFields. Click on that and select EmployeeID.

Step11: New search field "EmployeeID" will be added in the Search box along with all other existing search criterias.In this way you can search your instances by passing employeeID field value.
Composite sensors are very important from support and operations point of view as we can set custom search fields using which we can search for our composite instances.
For more imformation you can refer this LINK.

Hope you guys enjoyed the blog.

Happy Learning,


  1. Hi,
    Please help me on this ssue...
    I have deployed my composite. the service is working fine, however for looking into the flow trace, i launched it and couldnt able to see the hyper link for the Bpel instance, so not able to look into the audit flow. the flow trace is showing the services and references but the bpel instance link is not there to launch the audit flow.

  2. What is the status of your BPEL instance. Is it completed or still running , at the time you faced this issue ??

  3. Useful and clear . Thanks man