Integration

Get Involved. Join the Conversation.

Topic

    Fabian Wipfli
    ICS asynchronous call
    Topic posted April 12, 2018 by Fabian WipfliBlue Ribbon: 750+ Points, last edited April 23, 2018 by Arijit ChakrabortyBronze Trophy: 5,000+ Points, tagged Database, Integration 
    340 Views, 9 Comments
    Title:
    ICS asynchronous call
    Summary:
    ICS asynchronous call
    Content:

    Hi, It is possible to invoke a database procedure with ICS asynchronous, without waiting of a result? Regards Fabian.

    Comment

     

    • Ravi Sankaran

      Can you explain your usecase? This would hel us procide the right recommendations

    • Fabian Wipfli

      The user will call a webservice and get a unique key which is correlated to an order. The user has the opportunity with the unique key to ask about the order status.

      Webservice Operation 1

      1. The user calls the webservice with the order as input.

      2. This webservice call will invoke a database function which generates an unique key. And it will create a table record...

      3. Then it will invoke a procedure which creates the order correlated to the unique key... This call should be asynchronous. Because it is a long-running process.

      4.The webservice returns the unique key.

      Webservice Operation  2

      1. The user calls the webservice with the unique key as input parameter.

      2. The webservice will invoke a database function to get the order status.

      3  The webservice returns the order status.

    • Hemanth Lakkaraju

      When you say  Webservice Operation 1 and Webservice Operation 2 - does that mean these are existing external webservice operations or the ICS endpoints that you will be designing to achieve the functionality?

    • Fabian Wipfli

      They are the ICS endpoints that I will create.

    • Hemanth Lakkaraju

      Is the step3 in Webservice operation1 is a pure DB call (using DB adapter)? or a webservice call that internally does a DB operation? If it is former, and if your procedure doesn't send any response, you can simply do a DB procedure invoke and respond with key generated in step2.

    • Fabian Wipfli

      Hi, Yes I use for step3 a DB adapter. Yes of course I can invoke the procedure in step2, but I will have still the same problem. After this change the step2 will be also a long-running process.

    • Hemanth Lakkaraju
      
      

      Hi, Yes I use for step3 a DB adapter. Yes of course I can invoke the procedure in step2, but I will have still the same problem.

      You need to invoke a wrapper procedure from DB adapter which uses DBMS_JOB package to submit a job that calls the actual procedure. This way the procedure running actual functionality can be made asynchronous. So your ICS flow depicting Webservice operation1 will be something like this.

      SOAP Trigger (Request) --> DB Invoke (calling a function that returns a key) --> DB Invoke (calling a wrapper procedure, which uses DBMS JOB internally to submit a job that runs actual procedure) --> SOAP Trigger (Response that has key obtained in 1st DB invoke)

      Hope this helps!

      
      

      After this change the step2 will be also a long-running process.

      I'm not clear which step2 are you referring here!

    • Fabian Wipfli

      Hi, Thanks. I referred to step2 in operation 1. Let's get to the point. Your statement says that the ICS DB adapter don't have the ability to call a database procedure asynchronous. For the purpose to have the ability to work with an asynchronous procedure I have to implement a database job. I'm right? Kindly regards Fabian

    • Hemanth Lakkaraju
      
      

      Your statement says that the ICS DB adapter don't have the ability to call a database procedure asynchronous.

      DB supports calling one-way procedure as well, without returning any response. But it's not a pure-async way.

      
      

      For the purpose to have the ability to work with an asynchronous procedure I have to implement a database job. I'm right?

      Correct! That's one-way I can think of to do this!