Script and Rules Execution Order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 02:11 AM
Hi All,
I have been wondering for a while now.
As per my understanding, the execution order is always from lower to higher.
So if there are 5 scripts, with the order 0, -100, -300, 100, 200
Then the scripts will be executed in the order -300, -100, 0, 100, 200
But my doubt is, what if the order is blank/null. There is no constraint put on the order field. So the value can be removed.
As per my observation, if there is no value then the behavior is different based on the type of rule/script.
1) For client side (like Client Script), the scripts with no order is executed first. This is followed by the execution of the scripts as per the integer order.
2) For server side (like Business Rules), the scripts with no order is not executed at all. Only the scripts which have an order is executed, as per the integer order.
Please help me understand why it works like this.
Thanks in Advance
Balu
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 02:31 AM
Hi Bala,
Order is nothing but the systematic process of executing the BR or CS. In case order is not define the engine has no clue of when to execute the BR.
You are write about the lowest order gets executed first than the higher ones.
I am bit worried about you using (minus) values. But inorder to get much information on order of execution you can go through: https://community.servicenow.com/external-link.jspa?url=http%3A//wiki.servicenow.com/index.php%3Fti...