- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 05:58 PM
Hello
I'm trying to send a notification that is triggered by an event. My current configuration is the following:
1. Workflow calls event from task
2. event triggers notification
The way I'm calling the event is using the following syntax:
// Set values for the task in this script. Use the variable 'task' when setting additional values. // Note: This script is run after the task values are set using the Fields, Template or Values you have specified. // // For example: // task.short_description = current.short_description; // Set values for the task in this script. Use the variable 'task' when setting additional values. // Note: This script is run after the task values are set using the Fields, Template or Values you have specified. // // For example: // task.short_description = current.short_description; // Set values for the task in this script. Use the variable 'task' when setting additional values. // Note: This script is run after the task values are set using the Fields, Template or Values you have specified. // // For example: // task.short_description = current.short_description; //task.u_require_attachment = true; var reminderDate = new GlideDate(); reminderDate.addDaysUTC(0);//7 gs.eventQueue('rfs.approval.reminder',current,current.sys_id,''); gs.eventQueueScheduled('rfs.approval.reminder', current, '','', reminderDate); gs.log("run date: " + runDate); gs.log("reminder date: " + reminderDate);
I plan on calling the event 7 days after the current date but for testng purposes I place "0" under the "addDays" function so that the notification is sent instantly.
The problem is that the notification is not being sent, however under the "What it will contain" --->"Message HTML" box I call an email script where I placed a log that is working, meaning that the notificaction is being processed but when I check on the sent outbox records, the notification is not there. I can't seem to find the problem.
I appreciate your help.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 10:01 AM
I found the problem, there was a typo when calling the event from the task. I corrected it and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 06:27 PM
Hi Samuel,
Who do you have set as the recipients of the email? Need to ensure that you have recipients defined on the email notification and that users who meet the recipient criteria have notifications enabled on their user profiles. If no users are being added to the email or all users who are being added have notifications turned off, the email won't send but mail script processing will still happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 08:49 PM
Hi Bob,
I put myself as the recipent of the email notification and I am enabled and I also checked the "Send to event creator" checkbox as well. In fact, after the workflow task, I added a notification activity with myself as the recipient and it works fine.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 08:18 PM
hi Samuel,
Can you please go to your notification record and click the Preview Notification and you can test it with a record/event and see who would receive it. If their name is crossed out, hover over the name to find out why. It's a great way of debugging notifications. Also, Check if "Send to event creator" is checked in the specific email notification. If there is nothing in the email logs for this particular notification including skipped, even though you saw an Event Log with the notification_engine.process event. What you could do is go to that event, add the "Email Log->Event" list to the Event Form. This way you can (double) confirm that an email was or was not sent.
For further email notification troubleshooting, you can view the Hi KB Article KB0538135 which has several potential resolutions.There are so many possible outcomes for why the customer did not receive the email. If you do confirm that indeed the email was sent, the issue is most definitely on the customer side.
Let me know if you have any questions,
Adi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 08:59 PM
Hi Aditya,
I previewed the notifiacion and my name appears un-crossed and I also checked the "send to event creator" checkbox. I never checked the event logs but now that I have, I noticed that the event hasn't ran which is weird because the email script log is being returned meaning that the notification was processed.
I don't quite understand the last point you mentioned:
"What you could do is go to that event, add the "Email Log->Event" list to the Event Form."