Send notification 1 hour before SLA breaches

dhathrianoop
Giga Expert

I want to send an email to the assigned group 1 hour before SLA breaches.

1 ACCEPTED SOLUTION

No, we cant define conditions directly in  notification because notification can be triggered When event is fired or record is inserted or updated.

What you need to do is, you need Create a event(sla.breach.one.hour.before) on task_sla table in event registry and trigger it from run script activity before one hour as below

var breachTime = current.planned_end_time ;

gs.log("breachTime: "+breachTime);

var gdt = new GlideDateTime(breachTime);

gdt.addSeconds(-3600);

gs.log("reminder date:"+gdt);

gs.eventQueueScheduled ("sla.breach.one.hour.before" , current , gs.getUserID(), gs.getUserName(), gdt);

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade

View solution in original post

15 REPLIES 15

The Timer activity pauses the workflow for a specified period of time. This duration can be an absolute time value or a relative value based on a defined schedule. It is best to adjust the Duration so the workflow can progress in a timely manner.

Let me give you the correct solution.

Thanks,

Abhishek Gardade

Thank you,
Abhishek Gardade

Is it possible to give condition directly in notification?

No, we cant define conditions directly in  notification because notification can be triggered When event is fired or record is inserted or updated.

What you need to do is, you need Create a event(sla.breach.one.hour.before) on task_sla table in event registry and trigger it from run script activity before one hour as below

var breachTime = current.planned_end_time ;

gs.log("breachTime: "+breachTime);

var gdt = new GlideDateTime(breachTime);

gdt.addSeconds(-3600);

gs.log("reminder date:"+gdt);

gs.eventQueueScheduled ("sla.breach.one.hour.before" , current , gs.getUserID(), gs.getUserName(), gdt);

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade

I have added run script as in screen , is it correct?

YOu can add it their as well. but its good to add it before SLA HAS BREACHED ACTIVITY.

find_real_file.png

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade