Query on "REST API and business rule running order"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 04:51 AM
Hi Expert ,
Just wanted to know in following scenario -
we have scripted API which insert data in "A", "B" , "C" tables. it means all business rule which are running on "A", "B" , "C" tables they will also run.
but scripted api need to wait for all business rule to complete before sending response back??
for ex.
1.all business rules on table A take 1 mins to complete.
1.all business rules on table B take 2 mins to complete.
1.all business rules on table A take 3 mins to complete.
does it mean that scripted API need to wait minimum 6 mins before sending the response
OR
API will process normally and all business rule will get trigger but REST api will not wait for all to complete ??
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 04:54 AM
Hi,
you would never know how much time all the BRs take on those 3 tables
So you cannot tell system to wait for x mins
What's your requirement?
Usually API calls are synchronous so 3rd party can send the data and the BRs can run in background but you can send immediate response as soon as 3rd party consumes the API
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 06:17 AM
Hi Ankur ,
i have assumed time (1 min, 2 mins, 3 mins) just to understand the flow of REST api VS business rule .
Just wanted to know if API will wait for all business rule to finish or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 09:43 AM
Hi,
Nope
The API won't wait and the script would send the response once the scripted rest api script is completed.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2022 01:09 AM
Any supporting document of servicenow on this statement?