Integration

Get Involved. Join the Conversation.

Topic

    logu Prasanth
    How to send HTTPS 200 response Immediately to When Client...Answered
    Topic posted August 19, 2019 by logu PrasanthSilver Medal: 2,000+ Points, tagged Adapters, API, Connection, Integration, Mapping, Orchestration, xml 
    60 Views, 18 Comments
    Title:
    How to send HTTPS 200 response Immediately to When Client make POST call? in App driven Orchestration
    Summary:
    We are using APP DRIVEN ORCHESTRATION to Create a Purchase order
    Content:

    My Workflow

    Step 1 
    - Client post the metadata to OIC Endpoint. 
    Step 2 
    - In the same flow, OIC makes Get call using Metadata to get PO Data. 
    Step 3 
    - Now, OIC process the PO data to create the PO in Oracle EBS and send Success/Failure Acknowledgement to Client. 
    Step 4 
    - OIC will send HTTPS 200 response after all the operation completed in OIC for Clients POST call. 

    Is there any option available to send HTTPS 200 response Immediately to When Client make POST call? 

    Here I have attached the Integration flow screenshot.

    Scope having all the mentioned steps.

     

    Image:

    Best Comment

    Tuck Chang

    Does it have to be a 200 or is it ok to be 202. If 202 is ok and you are not intending to send back a body, then simply configure the REST Trigger post call with no response body, no headers to return. If you configure it such that no headers and no body is returned, the REST trigger will return an immediate 202.

    Comment

     

    • Hemanth Lakkaraju

      Are you expecting OIC to send 2 responses back to client - in step#3 and step#4? Why response code 200 only? Why immediately?Does your client understands the callback?

      • logu Prasanth

        Client Expect Immediate response for that POST call otherwise Client system shows time out Error at their log

        • Hemanth Lakkaraju

          What's the client's timeout configuration? Can they increase? What's the OIC flow completion time?

          • logu Prasanth

            The client expects the response within 1min for their POST call. OIC flow completion time will differ for every Call but the maximum time is 1.30 to 2 min. but most of the cases will complete within a minute. 

            • Kanchankumar Khedkar

              In this case, IMHO best solution is to ask client to increase timeout to 2 mins. Because most of your calls are anyways getting completing within a minute.

    • Kanchankumar Khedkar

      If I understand it correctly, your client is expecting an immediate acknowledgement once request is received and another one once the request is processed. I assume once request is processed, your calling application must have provided another webservice for sending response back. 

      Here is what I would do 

      --> Create one way process which actually processes the data and sends second response back. 

      Once request POST request is received, invoke this separate process developed (Since this is one way, immediately flow will continue). Here you can send response 200 OK to client. 

      Above design should help.

      As per my understanding, once you send response (Reply) activity, then flow complete. Hence, no activity get executed. 

      Thank you.

      • logu Prasanth

        Thank you so much. is possible to invoke the one integration from another one in below version.

        Version: 18.3.3.0.0 (180821.0400.14040)
        Database Schema Version: 18.08.16 

        Under Integration artifacts, I have the only business process. no iteration process

        • Kanchankumar Khedkar

          Local integration is a feature flag. This feature flag is available from v 18.3.1. So you should be able to request this feature flag via SR. 

          Please refer to - https://blogs.oracle.com/integration/enabling-the-future-today-feature-flags-in-oracle-integration-cloud

          Just in case you need it immediately, you can anyways refer integration developed like any other service using a SOAP Adapter.   

        • Kanchankumar Khedkar

          Local integration is a feature flag. This feature flag is available from v 18.3.1. So you should be able to request this feature flag via SR. 

          Please refer to - https://blogs.oracle.com/integration/enabling-the-future-today-feature-flags-in-oracle-integration-cloud

          Just in case you need it immediately, you can anyways refer integration developed like any other service using a SOAP Adapter.   

          • logu Prasanth

            For Enabling feature flag is an additional cost? because OIC is Client environment.

            SOAP adapter is not accepting client side. 

            Is there any other solution to send a response immediately.

            • Kanchankumar Khedkar

              I don't think Feature flag is additional cost. If you have deployed the OIC integration - take its endpoint and configure a new SOAP/OIC adapter as (invoke) and then try. 

               

            • Jihane

              there is no extra cost when logging an SR to enable a feature flag. You would need to request through an SR.
              Oracle is following a model that allows them to trial new features without making them available to everyone. 
              so they Gain feedback on new features before rolling them out, and as a user, you will be participating in the Testing of this feature as well, so expect to face some issues/problems.
              In my case when we have enabled "oic.ics.console.integration.invoke.local.integration" to invoke another integration, we had an issue when calling an integration of type App Driven. So give it a try, they should have fixed it by now.

    • KAMAL HOSSEN

      Hi @Logu Prasanth

      Below could be the easy solution making it loosely coupled Async-

      1. Integration #01:

      - Get the request to publish into the Queue

      - Send the 200 response back to the client

      2. Integration #02:

      Read from the Queue and complete the processing.

      Thank you.

       

      Regards,

      Kamal

    • Tuck Chang

      Does it have to be a 200 or is it ok to be 202. If 202 is ok and you are not intending to send back a body, then simply configure the REST Trigger post call with no response body, no headers to return. If you configure it such that no headers and no body is returned, the REST trigger will return an immediate 202.

      • logu Prasanth

        Thanks Tuck Chang.

        While hit Endpoint through external client tool (POST MAN/ SOAPUI) it will takes more than one time to POST the data and the behavior is intermediate.

        After Make a post call OIC will receiving data after one minute only.

        its controlled by network or OIC?

        Regards,

        -Logu

         

        • Tuck Chang

          Your invocation of the endpoint exposed by OIC should equate to one execution of your app driven orchestration flow. Do you detect duplicates when you hit it more than once eventually in the end system?

          If your invocation of the OIC endpoint is taking a minute, I think it's useful to find out whether your flow is taking this long to finish. Can you look at your monitoring to correlate the behavior you are seeing in Postman with the elapsed execution time? If the elapsed execution time is about a minute, then it mean that the flow execution is taking most of the time and we need to look at optimizing the flow to execute quicker.

          • logu Prasanth

            No, there is no problem in flow. your understanding is bit different i will explain.

            OIC did't post anything.. Client configure the OIC endpoint at their application. they are posting some data to OIC but OIC receiving the process after one minute.

            is there any load-balancer configuration issue?

            • Tuck Chang

              There should not be a delay invocation of OIC endpoint. Does the flow complete very quickly when OIC does receive the request to process? Is the elapse time very little even though the invocation itself is 1 minute?