To update from an official standpoint on the GatewayScript action. The general recommendation is that asynchronous 'on' at the action level not be used in GatewayScript despite the ability to force it on in the configuration. The UI does not expose the "asynchronous" option specifically for GatewayScript actions and while it can be set via CLI or SOMA for example, development would recommend that GatewayScript use only synchronous.
Should anyone be interested in support for GatewayScript asynchronous it is recommended a feature request be filed or voted on for development's consideration at https://integration-development.ideas.ibm.com/ideas -- to note that any consideration of GatewayScript action having asynchronous support would be in a future release.
------------------------------
DOMINIC MICALE
------------------------------
Original Message:
Sent: Wed May 29, 2024 01:04 PM
From: DOMINIC MICALE
Subject: Invoke Gateway script action in Asynchronous mode
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
Original Message:
Sent: Tue May 28, 2024 12:33 AM
From: Jayprakash Yadav
Subject: Invoke Gateway script action in Asynchronous mode
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
Original Message:
Sent: Fri May 24, 2024 01:16 PM
From: Sudarshan Bandaru
Subject: Invoke Gateway script action in Asynchronous mode
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
------------------------------