Question regarding executeAsync() RESTMessageV2 in outbound
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2022 11:00 PM
Hi Community,
I have created an asynchronous business rule to trigger a REST Message which execute asynchronously (using executeAsync() method) to create a ticket in third party system. As per my understanding any lines after executeAsync() method will not work. But, in my case I had defined getStatusCode and getBody methods in the script after executeAsync(), and I am able to parse the response. How is this possible? I am missing something? or my understanding is incorrect?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2022 11:26 PM
Hi Suvro,
I did looked at the article and assumed the response cannot be handled when using executeAsync() method, but I am able to parse the response and update the incident objects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2024 02:59 PM
When you use executeAync but then call methods like waitForResponse, getBody, or getStatusCode the request turns synchronous automatically, even if you use executeAsync.
For your reference:
Outbound Integrations Using SOAP / REST: Performan... - ServiceNow Community