Any issues using Before Insert Business rule to abort record creation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 04:57 AM - edited 08-05-2024 07:49 AM
Hello,
Today we have many sources like - Data sources, IH-ETL, Rest API calls etc which creates/udpates CI records in CMDB tables.
We got new requriemetns like if the data source is sending a record which has 'Operating system as Win 2003' then dont allow to insert the record. If the product model is 'ABC' then dont insert the CI record etc.
We are planning to write a 'Before insert Business rule' to abort such records from getting created (while I know that we have other solutions like use onBefore script to filter etc), we still wanted to go with Before insert Business rule approach because this eliminates to spend time in correcting all the data sources vs just writing a single Business rule.
Question - Is there any impact if we use this method? Like performance impact or anything else? If there is any imapact, what is the impact?
(the incoming data may be huge sometimes say 10k inccming records of which 3k records might want to be discarded)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 06:05 AM
Your solution will have everything processed and then decide not to do anything with the data.
Excluding 30% of the data even being considered for record creation would be a better way, performance wise.
The only reason to have a Before BR (as well) is so no manual CI's can be created with these attributes. If it was 10 records, I would just use the BR, but with 3K records, put the onBefore script to use. What's your reason for not doing that? You just say 'we know there are [better] solutions, but we want a different one.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 07:52 AM
@Mark Manders reason is avoid spending time in identifing all the multiple data soruces out there (APIs, import sets, IHETLs etc) and fixing them vs just writing a Business rule.
And yes, its like have everything processed and then decide not to do anything with the data. but this is the quickest solution we thought of.
I am looking for impacts if any with this approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 10:39 PM
The impact is in performance and loading time. Your BR will run on each and every insert (10K times), while your onBefore script will run once and takes away 3K runs from your BR process. It has been mentioned by several people already but it seems like you want the easy way out. That's not the best solution for the platform though.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark