Wednesday, November 25, 2009

How to change BPEL 11g preference values during deployment time

How you can set BPEL preferences in 11g during design time in JDeveloper and run-time in the EM console is described here (for the latter look in the comments for a reference).

Sometimes it is useful to change the preference values during deployment time, because preferences hold environment specific values. Actually, this is pretty easy by using composite deployment configuration plan(s). One for each target environment.

Right-click on the composite file and generate a deployment configuration plan for your composite. When you open the file, you will find a search/replace construction for the preference.


Now change the value to the environment specific value, save the config plan and use the config plan during deployment to a specifc environment.

Monday, November 23, 2009

Oracle Fusion Middleware 11g end-to-end tracking using the ECID

In a previous posting I described how you could use composite sensors to enable end-to-end tracking for messages that move through the Oracle Fusion Middleware SCA engine and the B2B engine.

Today, I discovered that you can also use ECID for end-to-end tracking. The B2B application message contains all the tracking properties that are originated from the SCA composite that submitted the message to the B2B engine. With the B2B Report console you are able to search for messages using the ECID. To enable searching on ECID, you have to add the ECID search field to the search panel (use the Add fields button ):

So, the ECID also enables end-to-end message tracking in Oracle Fusion Middleware 11g when message move through the B2B engine. This time completely out-of-the-box.

UPDATE 25-11-2O09: The application message holds the fabric data for in and outbound message from the SCA FMW11g fabric [OLD Disclaimer: I only tested it for outbound communication using the native B2B adapter. Still have to test it for inbound communication and AQ and JMS interfacing with the B2B engine.]

How to configure an ebXML communication in Oracle Fusion Middleware B2B 11g

Oracle Fusion Middleware (OFM) B2B 11g supports many business document and messaging standards. ebXML (Electronic Business using Extensible Markup Language is a B2B messaging standard that is also supported by OFM B2B 11g. Shortly described ebXML enables XML messaging over the Electronic Business messaging Service (basically a SOAP extension), abbreviated as ebMS.

This posting describes how to set-up ebXML messaging using two local OFM B2B 11g (PS1) domains. For simplicity, I will extend my previous B2B example.

Please refer to my previous postings for more info about specific B2B 11g configuration concepts:



You have to configure both Paris and Berlin. Both configurations are mirrored. Normally, you would use the CPA/CPP import functionality of OFM B2B 11g for this. Unfortunately, I don't have a CPA availabe for this simple demo.

Trading Partners
Configure the hosts and TP in both B2B installations:
  • Paris (receiving role)
  • Berlin (sending role)
(Just use all the defaults, including the TP identification type 'Name')

Configure the document
An ebXML document is defined as a Custom document protocol in OFM B2B 11g. For simplicity, I have used my previous Order document example. I only have to change the document type and definition to resp. configure the ebMS specific properties
  • Action
  • Service
  • ServiceType
  • From role
  • To role

and to configure the inbound document identification. I used the XPATH Identification Expression for identifying inbound documents. Also specify a document routing id in the routing tab (I used Berlin_Order). The routing id can be used to route inbound messages to specific applications.

Delivery Channels
For both Berlin and Paris, I have specified Delivery Channels that uses the ebMS 2.0 protocol (I could use ebMS 1.0..but I prefer newest versions :)). Configuring an ebMS 2.0 delivery channel requires some specific settings. Here are the transport protocol settings that I have used:

  • url: http://host:port/b2b/transportServlet for receiving messages over http
  • Ack mode: async
  • Response mode: none
  • Retry count: 4
  • Retry interval: 2
  • -- Leave all the other setting to their default
Deployment and testing
Deploy the agreements (make sure you configure the capabilities correctly: Berlin is the sender and Paris the receiver in this scenario) on both sides (look here how to configure capabilities and agreements). To test the ebXML configuration, I have used my previous SCA example and modified it for this example. The modifications are in the mediator component, because I have to specify extra B2B adapter properties to allow the B2B engine to identify the agreement. For outbound communication there are two ways to identify an agreement using the B2B adapter in a OFM composite:

1. To and From party + document type and revision. B2B properties:
- b2b.documentTypeName
- b2b.documentProtocolRevision
- b2b.fromTradingPartnerId
- b2b.toTradingPartnerId

2. To and From party + ebMS Action, Service and Service Type:
- b2b.ebms.Service*
- b2b.ebms.ServiceType*
- b2b.ebms.action*
- b2b.fromTradingPartnerId
- b2b.toTradingPartnerId

(*) Those properties are not defined in the JDeveloper Assign activity wizard. You have to manually type in the names in the property selection panel

I used the second option with the following values:
  • action = Order_Action
  • Service = Order_Service
  • Service Type = Order_Service_Type
  • To party = Paris
  • From party = Berlin
Deploy the SCA composite and use the Test functionality of the EM console to run a test case. You can see the exact ebMS message when you click the packed message link in the wire message details screen.