Trigger an event from a business rule on Task_SLA

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 05:55 AM
I created a business rule that is set to run when the Business Elapsed Percentage hits 50%, this is an after rule set to run on update and insert.
I can not get the sla.warning event to fire. I would like to pass who the assigned to is on the task of the sla. Here is my code
(function executeRule(current, previous /*null when async*/) {
var task = new GlideRecord('task_sla');
task.addQuery('task', current.sys_id);
task.addActiveQuery();
task.query();
// Add your code here
while (task.next()) {
gs.eventQueue('sla.warning', task, task.getValue('assigned_to'),'TriggerRule');
}
})(current, previous);
- Labels:
-
Service Level Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 07:17 AM
Hi Jeson,
I would request you to trigger and event from Workflow at 50% elapsed time of a SLA.
It would be much easier to achieve .
Regards,
Ajay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 07:30 AM
I tried that, but there seems to be an issue with these notifications going out off business hours, I was seeing if there was a better way

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 07:34 AM
Hi,
You can try using something as below.
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('sla.warning', current, current.task.assigned_to,current.task.number);
})(current, previous);
In addition, why not use Workflow with a Timer activity to take of the same.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 07:39 AM