After Business Rule Order 1000 versus Async Business Rule

ryanbalcom
Mega Expert

What is the performance difference between an after business rule with an order of 1000 versus a Async business rule with order 100?

I suspect they are equivalent because when I run the business rule debugger it appears that after business rules with an order of 1000 run asynchronously?

Business Rules Best Practices - ServiceNow Wiki

http://wiki.servicenow.com/index.php?title=Execution_Order_of_Scripts_and_Engines#gsc.tab=0

1 ACCEPTED SOLUTION

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Ryan,



Yes, I get your point. But there shouldn't be any difference from the end user perspective for the 'After' Business Rules with order less than 1000 and more than 1000 (except the order in which they execute).



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Ryan,



Async business rule is required when something is to be performed in backend for updating some other table data etc and user need not know about that.


After business rule is used when some fields needs to be updated and displayed to the user immediately after user saves the record.




Whenever async business rule runs it create a scheduler for it in background and based on the availability of the nodes in servicenow it will execute.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Ankur,



Thanks for response! I believe I understand the difference between after and async business rules. My reason for posting is to better understand the performance difference. The documentation mentions async uses the scheduler, however, when you have an after business rule with an order of 1000 or higher the platform seems to also use the scheduler for it.



I have a feeling that an after rule with an order of 1000 is equivalent in performance to a async business rule. Hoping to see if anyone else has observed this or feels in favor or opposite.


Stefan Baldhof1
Kilo Guru

Additionaly to Ankurs explanation an async BR doesn't have access to the "previous" Glide Record any more!


Stefan,



Thanks for taking the time to response. I have the feeling that an after business rule with order >= 1000 is equivalent to an async business rule. I may need to test if previous and the changes() method work in after rules with an order >= 1000