How to prevent Alert Management Rule from running multiple times and updating duplicate work notes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I’m working on a requirement in ServiceNow Event Management (EM Alerts) and facing an issue with multiple executions of the same sunflow.
Requirement:
A Alert Management Rule is triggered when an EM Alert is created or updated.
Based on Dynatrace root cause analysis, the sub-flow should:
Add a single work note to the alert
Complete all processing only once
If the same alert triggers the rule multiple times, it should not create duplicate work notes
If a new root cause is identified later, the logic may run again.
Problem
The Alert Management Rule runs when an alert matches the conditions. However, for the same alert, the rule (and the associated subflow) runs multiple times (for example, 5–7 times).
Inside the subflow, we are using an Update Record action to update Work Notes. The requirement is to update Work Notes only once with the message "** Dynatrace identified ..." and skip the update if the same text already exists.
We have written script logic to prevent duplicate updates, but it is still adding the same work note multiple times.
I believe this is happening because Alert Management Rules execute very quickly, and multiple executions occur before the Work Notes/journal entry is committed, causing the duplicate check to fail.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
What is the script logic you are using to prevent duplicate updates? I'd take a closer look at that first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Abdul13
Did you try updating the Alert management rule to execute when "Alert changes to filter" instead of "Alert matches filter"?
In Alert Filter tab, try to update the "Rule is activated when" field to Alert changes to filter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Swapna Abburi , Yes, we changed the “Rule is activated when” condition to “Alert changes to filter”, but the work notes are still being added multiple times.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Abdul13 could you please share the condition specified in Alert filter?
