Can you try setting below variable as shown below in sample snippet and test. Let me know if you still face issue. Screenshot is attached for your reference.
Hi Sathiesh,
Currently I am also working on the same issue, can you please let me know if you are able to fix this. When I run the “Check Expired WorkItem” task, the workitem is getting scanned, but the reminders were not sent.
Regards,
Abhilash
Hi Sathiesh,
I am also working on the same use case. I had modified your code and fixed the issue now. Now the emails are triggered whenever check expired work item task runs. Make sure you have an proper email for the user to whom the work item is assigned. Please check the below code
if(manualItem != null){
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.MINUTE, 10);
NotificationConfig notificationConfig = new NotificationConfig();
notificationConfig.setEnabled(true);
notificationConfig.setStartDate(calendar.getTime());
IConfig reminderConfig = new ReminderConfig();
reminderConfig.setEnabled(true);
reminderConfig.setMillis(259200000);
reminderConfig.setFrequency(259200000);
String emailTemplateName = "Custom Work Item Reminder";
reminderConfig.setEmailTemplateName(emailTemplateName);
EscalationConfig escConfig = new EscalationConfig();
escConfig.setEscalationRuleName("Escalation IIQ Support");
escConfig.setMaxReminders(10);
escConfig.setMillis(259200000);
escConfig.setFrequency(259200000);
escConfig.setEmailTemplateName(emailTemplateName);
escConfig.setEnabled(true);
List iconfigList = new ArrayList();
//iconfigList.add(configBase);
iconfigList.add(reminderConfig);
iconfigList.add(escConfig);
notificationConfig.setConfigs(iconfigList);
manualItem.setNotificationConfig(notificationConfig);
java.util.Date d = new Date();
manualItem.setWakeUpDate(d);
commit = true;
}
if(commit) {
context.saveObject(manualItem);
context.commitTransaction();
}
Setting the wakeup set and escalations fixed the issue.
Regards,
Abhilash