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-05-2022 07:39 PM
Hi,
I haven't searched it but you can try to search in docs or some blog
If my response helped please mark it correct and close the thread so that it benefits future readers.
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 04:57 AM
Hi,
What is the point in waiting. Are we getting some values from the Business Rules that we need to send in response. If not you can send a status like 102 --> stands for processing or 200 or 202, whatever makes sense. You can go through below link for various response status so that it is very informative
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 06:22 AM
My REST API is taking time in processing and i am trying to troubleshoot the flow. If business rule is taking time in processing then i need to disable business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2022 09:21 PM
Hi,
Try using gr.setWorkflow(false); just before you are doing any update or insert and Check whether it reduces any time. It will help