Friday, October 31, 2014

Orcale BPEL Compensation Handler Vs Compensate

We use Compensation when we need to revert the action done through webservice as there is no rollback stategy in webservice we need to call the revert activity of that particular service.


Compensation Handler : Reverse action to be conducted for the given scope. It wont be auto triggered.

Compensate: Composite Handler will be get triggered by Composite event.

If there are two compensation handler in a composite all the handler will be executed when we invoke compensate event.



Wednesday, October 29, 2014

OSB How to handle large payload

"Content streaming" is the solution for handling large payload in OSB.

We can enable this option in 'Message Handler' section of proxy service.

We can use the content streaming when rounting the content to end system based on the routing condition ie., without transforming the complete payload. As tranforming complete data will need huge RAM based on the payload size.

Instead we use the advantage of xquery which traverse only the particular element instead of loading complete payload. Here we need to be carefull the output variable which is created out of xquery transformation. This variable size also should be very huge as compared the RAM size

For best practise pls refer this link: http://docs.oracle.com/cd/E23943_01/admin.1111/e15867/context.htm#i1110512

We can also use streaming in DB Polling in JCA Adaptor.



Tuesday, October 7, 2014

Tracking OSB Instance | Logging vs Tracing

Oracle Service Bus tracking the instance:

1. OSB is stateless in nature so there is no consept of instances lineup like in BPEL. But we can have a log entry at the start of the OSB project such that we can make sure to track the failed call. We can log the important entries like Client Name invoked the OSB Project and Unique Id.

Ex. If we call the getCustomerDetail OSB call from Customer Portal

In realtime we have a header and body part for each request. Header part will speak about the which client calls (CallFrom) the osb and name of the osb composite(CallTo). In log we need to log this entry along with the UniqueID for unique representation. UniqueID is the combination of timestamp and id for the request which is populated from the portal.



 <xsd:complexType name="RequestHeader">
    <xsd:sequence>
      <xsd:element name="CallFrom"/>
      <xsd:element name="CallTo"/>
      <xsd:element name="UniqueID"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="RequestBody">
    <xsd:sequence>
      <xsd:element name="id"/>
    </xsd:sequence>
  </xsd:complexType>

For debugging the scenarios, you can also enable tracing (in Operation Settings) on the proxy/business service to capture the complete trace of the execution. But ensure this setting is turned off in PROD environments as this hampers performance.

Wednesday, October 1, 2014

Difference between Oracle SOA BPEL Service Callout and Routing

Difference between Oracle SOA BPEL Service Callout and Routing

Routing Action - Routing action can be created inside a Route Node only and Route Node is the last node in a request processing. A Route Node indicates that Request Processing will end here and Response Processing will begin. You can not have any node after Route Node in the message flow.

Service Callout - Service Callout is used in real time request-response scenarios (for sync response). If you have a use case where you need to call one or multiple real time request-response services (like sync web-services) then you may use Service Callout action in the message flow. Being a synchronus call, the thread gets blocked until a response is returned from target service.

Publish Action - Publish action is used for Request only scenarios where you don't expect a response back. The nature of Publish action (sync or async) will depend upon the target service you are invoking. If you are invoking an external service through a business service then Publish action with Quality of Service(QoS) as "Best Effort" (default) will work like fire and forget and thread won't get blocked (async call). If you are invoking a local proxy service (proxy with transport protocol as "local") from another proxy using publish action then it would be a blocking call (synchronus call) and thread will get blocked untill the processing of local proxy finishes.