Sunday, November 21, 2010

Exposing Ora BPEL processes as Web services in OSB layer

With Oracle Service Bus's native transport for Oracle BPEL Process Manager (BPEL transport), you can expose BPEL processes as Web services in the service bus layer, letting other services invoke BPEL processes; thus letting you include BPEL processes in your service oriented architecture (SOA).
 Communication between Oracle BPEL Process Manager and Oracle Service Bus is done over SOAP only. OSB and Oracle BPM do not provide full support for SOAP RPC encoding.
  • SOAP 1.1. SOAP 1.2 is supported only from Oracle Service Bus to Oracle BPEL Process Manager using synchronous communication.
  • SOAP headers

BPEL transport has the following restrictions:
  • No attachments
  • No WS-Security or WS-RM
Oracle BPEL Process Manager supports transaction propagation through its API, and the BPEL transport is transactional to support transaction propagation when Oracle BPEL Process Manager is deployed on Oracle WebLogic Server. For example, if a process begins in a service outside of Oracle BPEL Process Manager, Oracle Service Bus can propagate the transaction to Oracle BPEL Process Manager through the BPEL transport to complete the transaction.

Communicating to and fro Oracle BPEL Process Manager through Oracle Service Bus
1. Synchronous: Invoking Processes in Oracle BPEL Process Manager
Description of Figure 34-1 follows
  a. Create a Business Service in Oracle Service Bus that represents the BPEL process you want to invoke.
  • Create a WSDL-based business service. Generate the WSDL from Oracle BPEL Process Manager.
  • Select the bpel-10g transport in the business service configuration.
  • Set the Endpoint URI
  • Configure the remainder of the business service

  b. Create a Proxy Service in Oracle Service Bus that invokes the business service

 2.  Synchronous: Calling External Services from Oracle BPEL Process Manager
Description of Figure 34-2 follows
  • Create a Business Service in Oracle Service Bus that represents the external service you want to invoke
  • Create a Proxy Service in Oracle Service Bus that invokes the business service.
    • You must create the proxy with a SOAP WSDL to invoke the business service.When defining your proxy service, for the Service Type select WSDL Web Service, and select the desired port or binding.
    • Select the sb transport in the proxy service configuration.
    • To invoke the proxy service from Oracle BPEL Process Manager, export the proxy service's effective WSDL and import it into your Oracle BPEL Process Manager development environment. Invoke the proxy service from Oracle BPEL Process Manager as you normally would.
 3. Asynchronous: Invoking Processes in Oracle BPEL Process Manager
Description of Figure 34-3 follows
  • Create two proxy services in Oracle Service Bus: one that invokes the business service and another that handles the callback.
    Request Proxy Service
    • Since the callback will be sent on a different connection in asynchronous communication, you must establish the callback address in the request proxy. This callback address will be passed to the callback proxy and callback business services so that the message is sent back to the correct client.
      As part of the business service configuration, you select a Callback Proxy. At run time, the BPEL transport uses this proxy as the callback proxy.
      For approaches to setting a callback address if you do not select a callback proxy in the business service
    Callback Proxy Service
    • Configure the proxy to use a Service Type of WSDL SOAP or Any SOAP Service and the SB or HTTP transport. Use the SB transport if you want transaction propagation from Oracle BPEL Process Manager to Oracle Service Bus.
      If you select this proxy service as the business service's callback proxy, the BPEL transport provides the correct callback URI at run time.
  • Create two business services in Oracle Service Bus: one that makes the request to the Oracle BPEL Process Manager process you want to interact with and another that handles the callback.
    Request Business Service
    • Create a WSDL-based business service. Generate the WSDL from Oracle BPEL Process Manager. Select a Service Type of WSDL Web Service, and select the appropriate binding or port in the WSDL.
    • Select the bpel-10g transport in the business service configuration.
    • Set the role to Asynchronous Client.
    • Set the Endpoint URI.
    • Use the Callback Proxy field on the bpel-10g transport configuration page to select the callback proxy you created.
    Callback Business Service
    Configure the business process you need to handle the callback.
 4. Asynchronous: Calling Service Providers from Oracle BPEL Process Manager

Description of Figure 34-4 follows

Creating and Configuring the Services

  • Create two proxy services in Oracle Service Bus: one for the request that invokes the business service and another that handles the callback.
    Request Proxy Service
    • Configure the proxy service to use the sb transport.
    • Since the callback will be sent on a different connection in asynchronous communication, you must establish a callback address so that the message is sent back to the correct client.
    Callback Proxy Service
    • Configure the proxy service to pass the callback address to the business service. The callback URI is provided in the request. Use URI rewriting to extract the callback URI and forward it to the business service.
  • Create two business services in Oracle Service Bus: a request business service that invokes the external service and a callback business service.
    Request Business Service
    • Configure the business service to invoke the external service.
    Callback Business Service
    • The callback business service receives the callback address from the callback proxy. The URI rewriting performed by the callback proxy service determines which BPEL process to send the response to.
      Create a WSDL-based business service. Generate the WSDL from Oracle BPEL Process Manager. Select a Service Type of WSDL Web Service, and select the appropriate binding or port in the WSDL
    • Select the bpel-10g transport in the business service configuration.
    • Set the Endpoint URI to bpel://callback. The callback URI is provided by the callback proxy service.
    • Set the role to Service Callback on the bpel-10g in transport configuration tab

Note:
If the callback address is always known, for example when the client and BPEL service are linked together because of a trading partner agreement, you can provide the exact callback address in the callback business service instead of using bpel://callback.
BPEL thru OSB: Associating messages with correct conversation


Refer:
Ora BPM thru OSB
Calling BPEL from OSB - good one 
Asynchronous BPEL to BPEL Through Oracle Service Bus Example
WS-Addressing Reference
Working with Proxy Services
Asynchronous BPEL to BPEL Through Oracle Service Bus Example
Setting a callback address
Working with Proxy Services

Other related topics:

1 comment:

  1. Hi i want invoke a osb any xml based proxy service from Bpel using sb protocol in proxy service is it possible?

    i dont have WSDL based proxy in my case.

    Thanks ,
    Rajashekhar

    ReplyDelete