Trigger an event from a business rule on Task_SLA

Options
- 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:
- Labels:
-
Service Level Management
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2019 07:44 AM
Hi,
Try changing the Business Elapsed Percentage condition from Changes To to Greater than 50.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.