After and Async BR

Priyanka_Ghosh
Tera Contributor

Hello,

 

Could anyone please tell me the difference between After BR using gs.eventQueue() and Async BR.

Is there any difference or is it the same. Explanation with example will be appreciated.

 

-Thanks.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Priyanka_Ghosh 

After BR + event + script action == Aysnc BR

Both will run asynchronously and won't impact the user transaction and user experience

explanation here

https://www.servicenow.com/community/now-platform-forum/difference-between-asyn-and-after-business-r....

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

@Priyanka_Ghosh 

yes that's correct.

After BR + event + script action-> the event is triggered and once it gets processed then the script action runs and does the work

It can be an alternative but 1 good example is consider you want to send email after 4 hours of the record getting updated. In this case you can use eventQueueScheduled() function and ensure the event is triggered after 4 hours so that the work is done after 4 hours once event is processed

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Runjay Patel
Giga Sage

HI @Priyanka_Ghosh ,

 

I have explained it with real time example in this video: https://youtu.be/VLwD4yt_AY4?si=BzdOq-tqvF-7ge-X

 

Do check this thread: https://servicenowwithrunjay.com/async-business-rule-in-servicenow/

 

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Part 29: An Async Business Rule in ServiceNow runs after a database operation (insert, update, delete) but executes asynchronously in a separate thread. This allows the main transaction to complete without waiting for the business rule to finish, improving performance for actions that don't ...