DataPower

 View Only
  • 1.  Invoke Gateway script action in Asynchronous mode

    Posted 16 days ago

    Hi,

    We got a requirement where we need to log request and response payloads by calling an API asynchronously.

    We have the logic written using gateway script and need to invoke Gateway script action in asynchronous mode. But I don't see async option available for Gatweway script action. The async option seems to be available only for Transform action(xsl).

    Is there any alternate way to achieve this?



    ------------------------------
    Sudarshan Bandaru
    ------------------------------


  • 2.  RE: Invoke Gateway script action in Asynchronous mode

    Posted 16 days ago

    Yes you can still achieve async destination url invoke, using urlopen module using Gatewayscript.

    https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=apis-urlopen-module



    ------------------------------
    Jayprakash Yadav
    ------------------------------



  • 3.  RE: Invoke Gateway script action in Asynchronous mode

    Posted 14 days ago

    To be clear GatewayScript inside the script itself can run functions asynchronously.  That does not mean that it is running asynchronously on the processing rule it resides on -- that is the asynchronous property in the action that allows you to run a transformation and then continue onto the next one, while the first processes asynchronously.

    The solution I think would be to use dp:gatewayscript to call the JS file from a asynchronous XSLT action: https://github.com/ibm-datapower/datapower-samples/blob/master/gatewayscript/example-ext-func-dp-gwscript.xsl

    I am investigating into GatewayScript and the asynchronous property (it is not exposed in the UI, but in other interfaces like SOMA/CLI).  I will update here when I have more information.



    ------------------------------
    DOMINIC MICALE
    ------------------------------