- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 09:59 AM
I registered an event called incident.assign.action triggered by business rule. That part seems to have worked.
I then created a notification using this event as trigger.
But the notification did not fire, and no emails were sent. I am not sure what I am missing. Please help.
Thanks,
M
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 11:46 AM
Hi MWright,
I think you have registered an event with name incident.assign.action and triggered it in the business rule, but in notification you are waiting for Incident assigned action event to trigger, which never triggers in this case as per my understanding.
Replace the Event Name in notification with the actual event you are triggering.
Hopefully this will resolve your problem.
Regards,
Muhammad Khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:10 AM
Hi
can you please share a screenshot for the section "Who will receive" as well as the code from your Business Rule.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:16 AM
Hi Maik,
Thank you for your response.
Notification-Who will receive:
The business rule did work, otherwise, it would not have created the Event Queue, right?
In any case, here is my business rule, as requested.:
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sysevent'); // We need to query the sysevent table
gr.addQuery('state', 'ready'); // We only want the event in the ready state
gr.addQuery('name', 'incident.assign.action'); // Change the event name to the event name you are using
gr.addQuery('table', 'incident');
gr.addQuery('instance', current.sys_id + ''); // Get the event that has been created for this record
/* Assuming there is only one ready event active for this record at a time, this can improve performance */
gr.setLimit(1);
gr.deleteMultiple();
//create a new event (reset the time)
var gdt = new GlideDateTime();
gdt.addSeconds(300); //3600 = 1 hour after right now
gs.eventQueueScheduled('incident.assign.action', current, current.assigned_to, current.assignment_group, gdt);
})(current, previous);
Thanks again,
M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 11:46 AM
Hi MWright,
I think you have registered an event with name incident.assign.action and triggered it in the business rule, but in notification you are waiting for Incident assigned action event to trigger, which never triggers in this case as per my understanding.
Replace the Event Name in notification with the actual event you are triggering.
Hopefully this will resolve your problem.
Regards,
Muhammad Khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 12:25 PM