- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2017 02:54 AM
Hi ,
I want to write a business rule on syslog table , Actually requirement is capture backgroundscript related logs and move them into new custom table.
i created business rule setting filter condtion it is working when log created manually but it is not working when logs created by system.See below screen shots
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 06:19 AM
Direct Business rules not triggered for Logs.
Use Scheduled jobs to get log records instead of Businessrules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 04:26 AM
Ok, so you only want BackgroundScripts, let me do a quick test on my own instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 05:42 AM
Yes.
I want only Background script logs ..and have to store in another table.
Thanks
Dhony.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018 05:40 AM
Hi Sergiu,
Any update for my query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018 07:03 AM
Sorry for late reply. I did the testing and indeed it's not working via a BR on syslog. My understanding so far based on my tests is that transactions from Background Scripts do not triggers business rules. That is why inserting manually a row in syslog triggers the BR but not when running a script via Background Scripts.
So rather than doing a BR like that, you could probably get away with having a scheduled job to run every hour and collect all Background Scripts records from syslog directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2018 10:30 PM
Hi guys,
A couple of pointers that i'm sure will be helpful:
a) background script does trigger business rules. This important and key. Lets keep in mind business rules enforces aspects like business logic, data consistency, security, etc... so, yes... indeed business rules are triggered regardless on how the operation gets executed (manually, background script, web service, etc...)
b) insert/update business rules over the system log table will never run. I believe this is by design due to the high amount of entries that could exist within the log table, an insert/update business rule could easily create a significant performance impact over your instance. I personally believe ServiceNow should stop users from creating insert/update BRs over the syslog table, but life is not perfect , so although you actually can create one, internally ServiceNow will halt any insert/update BR for the syslog table.
Thanks,
Berny