cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Escalation rule - For continuous escalated notifications or escalations

Escalation rule - For continuous escalated notifications or escalations

 

Introduction

Escalation Rule is used to escalate the Work Item to a new owner or we can reassign it to old owner depending upon the requirements. Escalation is triggered generally when the reminder notification process is complete or a specific number of days which were specified as escalation trigger.

Now if escalation is triggered once, next time triggering will be done once the reminder process or expiration days are completed again.

Suppose after one set of reminders or escalation trigger, you want escalation again and again. You need to turn off the remainder functionality (if configured) and change the escalation frequency.

 

Code for rule

Here is the piece of code you can use to do this.

It includes getting workitem in the rule and through workitem we are extracting notificationConfig.

/*

Reassignment to new Owner or Old Owner

Other transformations for Certification Workitem you want to do

*/

NotificationConfig notificationConfig = workItem.getNotificationConfig();

  if (notificationConfig!=null) {

  notificationConfig.setEscalationFrequencyMillis(value1);

  notificationConfig.setEscalationMaxReminders(value2);

  notificationConfig.setRemindersEnabled(false);

  }

 

Note: value1 & value2 are just dummy variables

 

Also, if you want to modify some fields in escalation email template you can do it here in the rule.

Suppose if you want to add someone in CC field in escalation email template or you want to add some more people in To field. You can do it in Escalation rule.

Since escalation email template is available in notificationConfig we can do modifications.

 

EmailTemplate escalationEmailTemplate = notificationConfig.getEscalationEmailTemplate();

escalationEmailTemplate.setTo(dummy1);

escalationEmailTemplate.setCc(dummy2);

context.saveObject(escalationEmailTemplate);

notificationConfig.setEscalationEmailTemplate(escalationEmailTemplate);

 

Note: For multiple email addresses dummy1 & dummy2 should contain comma separated string values(i.e Email Addresses in this case)

Labels (1)
Comments

As getEscalationEmailTemplate() and setEscalationEmailTemplate() is a deprecated function, do we have any alternate methods which serve the same functionality?

Version history
Revision #:
2 of 2
Last update:
‎Jul 28, 2023 06:52 PM
Updated by:
 
Contributors