- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 04:47 PM
I have a workflow that runs on the cmdb_ci_appl table that creates an INC. I need an email notification to be sent when the INC is created (assigned to group or Assigned to me).
I found that workflows created incidents don't trigger condition based email notifications. That correct?
So I created 2 events and duplicated the current email notifications (Incident assigned to group & Incident assigned to me) and set them up to be fired by the event with an additional condition of assignment_group = Review.
I ran my workflow and the events were created but what I realized was that the workflow is running on cmdb_ci_appl and that automatically creates the event on that table, where as I need it created on the Incident table.
What are my options to have an email notificaiton sent out when the workflow creates the Incidents?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2017 09:51 AM
Ah ha! Thanks for that screen shot Christina. The incident is being inserted with setWorkflow(false) - line 32 of the Workflow Activity in your screenshot. That is going to cause the platform to bypass the notification engine. There are a couple options:
1) Don't use setWorkflow(false)
2) Switch your notification over to one that fires on event creation. Use a Business Rule after insert/update to trigger the event.
(see Create your own event and Create an email notification for details about how to do this)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 04:50 PM
I wonder why can't you leverage the notification workflow Activity, have a read:
Mark your feedback( Like or Helpful or Correct) as per the impact of my response. Cheers!
Vab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 04:54 PM
condition based notification should still apply to scripted inserts into a table. Carefully analyze your conditions and when they apply.
does you condition apply on "insert" , "update" or both? also does the record you are creating meet all the conditions ie: [field] [is/changes to] [value]. also are you applying setWorkflow(false) on your gliderecord insert?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 04:59 PM
also, to address your event issue. if your event and notification are registered on the incident table and you are using the event workflow activity it will run it based on the table that the workflow is applied. I would fire the event in your wf script that creates incident using:
gs.eventQueue('event_name', yourIncidentGliderecord, parm1, parm2);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 06:04 PM
I was able to change the conditions and get one of the types of emails to send. Still working on why the other won't send.
Thanks for the info. Really appreciate it!