How to tell which business rule is being applied

Brent Cox
Mega Guru

Hello, 

 

Is there any way to tell when a certain business rule or other script is applied? I did some problem management upgrades over the weekend and now my incidents are being set to active=false whenever the incident state changes to In Progress. I am just wondering if there is a way to set logs or something to be able to pin point what is triggering this behavior? Thanks! 

1 ACCEPTED SOLUTION

Aniket Chavan
Tera Sage
Tera Sage

Hello @Brent Cox ,

In ServiceNow, you can use the Script Tracer to identify which business rule or script is being applied during a transaction.

1. Go to Script Tracer in the left navigation pane (admin role required).
2. Click "Start Tracer" and perform the transaction that triggers the script.
3. Review the Script Tracer table to identify the relevant script by checking "File Name," "File Type," "Table," and "Line Number" columns.
4. Click on a row to see detailed information in the State, Script, and Transactions tabs.
5. Use the information to debug or edit the script as needed.
6. Click "Clear trace" when finished.

below are the links which can help you to understand about Script tracer concept:

 

Let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

View solution in original post

5 REPLIES 5

Aniket Chavan
Tera Sage
Tera Sage

Hello @Brent Cox ,

In ServiceNow, you can use the Script Tracer to identify which business rule or script is being applied during a transaction.

1. Go to Script Tracer in the left navigation pane (admin role required).
2. Click "Start Tracer" and perform the transaction that triggers the script.
3. Review the Script Tracer table to identify the relevant script by checking "File Name," "File Type," "Table," and "Line Number" columns.
4. Click on a row to see detailed information in the State, Script, and Transactions tabs.
5. Use the information to debug or edit the script as needed.
6. Click "Clear trace" when finished.

below are the links which can help you to understand about Script tracer concept:

 

Let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

Dr Atul G- LNG
Tera Patron
Tera Patron

Perfect @Aniket Chavan . 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sainath N
Mega Sage
Mega Sage

@Brent Cox : You could do the tracking by enabling debugging in ServiceNow. The below screenshots help us enable the debug session and learn how to filter the transactions.

 

SainathN_0-1705936523952.pngSainathN_1-1705936543384.png

 

This helps us find all the bad transactions that happened for a particular action (in your case, state changes to progress).

 

Disable the session by looking for Disable All in the application navigator once you are done with testing.

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

WillardLe
Tera Contributor

Yeah, tracking down which business rule is firing can be a real pain, especially when you've got a bunch layered on top of each other. I've been there, digging through logs and scratching my head. Sometimes the issue isn’t even the rule itself but how it’s interacting with others or conflicting logic. When stuff like this starts affecting end users or clients, I’ve found it helpful to look at how others have handled similar situations— https://www.pissedconsumer.com/ has some surprising posts from folks dealing with business-side fallout from tech issues. Helped me realize how important it is to get ahead of these glitches.