Trigger an event from a business rule on Task_SLA

jsnmllr1981
Kilo Expert

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);

 

5 REPLIES 5

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.