Tuesday, November 25, 2014

Advantage of Oracle AIA for Error Handling notification



    Oracle Application Integration Architecture (AIA) delivers Pre-built services which can be reused in custom application.

    Error Handling is one of the AIA pre-build application, this service can be used in our custom composite to handle fault such that we can achive various advantages some of them are

    1. Achieving a canonical form of error handling across the system.
    2. For an fault we can trigger an email asynchronously.  Such that we can offload(loosely couple) email trigger functionality from our application.




    Monday, November 17, 2014

    OSB Asynchronus service call with updating the callback header

    OSB is constructed as client to consume the Asyncronus service. Lets consider we already build the Oracle SOA Asynchronous composite.

    Lets create proxy service to consume the asyncronus service.

    Flow 1:    Proxy 1 -> Business 1 -> SOA Asynchronous Composite 1

    Create a proxy service and business service. Business service just consumes SOA Asynchronous composite.

    Flow 2: SOA Asynchronous Composite 1 -> Proxy 2 -> Business service 2

    Now we need to create a new proxy and business service, such that SOA can callback to this OSB service.

    But how does SOA composite know the endpoint url of Proxy 2?!

    Hence we need to pass the callback proxy service( proxy 2) endpoint url in the the header of proxy 1 before invoking the business service 1 as below.

     In this proxy service while routing to the business service add an assign activity to reply to appropriate client service.

    <soap-env:Header xmlns:ns1="http://schemas.xmlsoap.org/ws/2003/03/addressing">
            <ns1:MessageID>ws:uniqueAddress</ns1:MessageID>
            <ns1:ReplyTo>
            <ns1:Address>http://localhost:8011/CallAsyncService/proxyServices/CallSyncCompositeProxy</ns1:Address>
             </ns1:ReplyTo>
     </soap-env:Header>


    Wednesday, November 12, 2014

    Handling Large File in BPEL/OSB

    There are three ways to handle the large file in Oracle SOA BPEL/OSB:

    1. Route the complete file from source to destination without tranformation:
    If we need to route the payload(File) to the destination based on some condition check then we can make the input file as stream. This can be achieved by checking the "Use File Streaming" check box during file adaptor creation.

    Point to be noted here is we cant use the file stream for passing the payload to target after tranformation as we cant load the large file in heap memory. File stream can be used when we need to pass the file as it to other destination with/without conditinal routing.


    2.  Route small part the payload(file) from source to destination:
    If we need to transform the smaller part of the payload then again we can use the file stream concept explain above. Only difference is we can transform the payload using XQUERY, where the transformed target payload SHOLD be small enough to load in memory.

    Example: Consider there are millions of Claims records in a file, if our destination service can process only individual claims at time then  we can go with this approach.

    3. Transfor comple large payload before routing:
    To transform complete payload before routing we can use file batch. Enter the batch size in   "Publish Messages in Batches of" during adaptor creation.

    Each batch will create individual instance, ie., each record will be processed in that instance.