Saturday, October 31, 2009

How to use composite sensors to enable end-to-end tracking of B2B messages in SOA Suite 11g

Prior to the 11g release of the SOA Suite end-to-end trackig&tracing of messages send out from OESB or BPEL via Oracle Integration B2B 10g, was not supported out-of-the box, because Oracle Integration B2B 10g was/is not part of the 10.1.3.x SOA Suite Suite. You always had to build custom code to enable end-to-end tracking & tracing of messages in such environments.

Because B2B is now fully integrated into the SOA Suite, it becomes possible to easily end-to-end B2B messages using composite sensors.

How to use composite sensors in common is described here by the Oracle SOA Suite PM team. Ok..but how can you use this feature to end-to-end track B2B messages that are submitted from a composite to Oracle B2B or vice-versa? Actually, it's quite simple. Below I will describe what you have to do at design-time and run-time to track B2B messages using the B2B message id as an example.

At the B2B adapter in JDeveloper composite editor we define a composite sensor named order_msgid (assuming you are using the example that I have given in a previous posting on this blog) and assign it the value of the b2b property b2b.messageId.  In my example I use an outbound scenario, so to make it work I have to set the message id in the composite instead of delegating the creation of the message id to B2B. In the mediator component I set the value of the b2b.messageId to the compositeInstanceId. At design time, we are finished deploy your sensorized composite to the server.

At run-time we have to add a search field for the defined sensor to be able to search on message ids in the composite instances tab. Go to the instances tab of the composite and click on 'Add fields' and select 'order_msgid'. It will be added to the search form. Note that the SOA engine automatically detects composite sensors! The instances tab should look as follows:

Test the composite by using the EM test screen. Select the new instance and open the instance flow. Unfold the payload of the B2B adapter message and verify that the b2b.messageId property has been set in the properties header:

Log in to the b2b management console (my B2B url: http://localhost:8001/b2b) and open the reports tab and select the business message tab. Select the details of the corresponding B2B message and discover that it has used the message id that has been set by the composite :)

You now can search in the EM composite instances tab for a specific instance using the B2B message id. This becomes very useful when the number of composite instances becomes very large in a production environment and maintenance team quickly wants to track down the flow of a specific B2B message in case of issues with that message..


Anonymous said...

Please let me know,how to retrive and process the B2B message id in case of inbound transactions.
I want to use B2B generated message id in the inbound messages to the BPEL through AQ.

Naveen Kumar T.

Yatika Dhingra said...

Your post is important for us thanx...
Business Directory Companies