this code will help you.
import sailpoint.object.WorkItem
Identity certifier = item.getNotificationOwner(context);
if(certifier != null) {
Identity manager = certifier.getManager();
Identity seniorManager = new Identity();
if(manager!=null){
seniorManager = manager.getManager();
}
List list=new ArrayList();
<<< generate all emails and keep the emails into list>>
return the list
in your code , incorrect part
//String itemID = "ac1818d9965a17438196ba290cb647dd"
//ac1818d8965a16fd8196b657f631092c String itemID = item.getId() ```
Yes, I have tried and the attached rule is an email recipient rule that I had added in the additional email recipient option already which is where I had my query.
Would you send me the code sample where I can send email to the certifier and the certifier’s manager?
Configure email reminder as usual and use the Additional Email Recipients option in the config and configure email reminder rule. In this case your To list will remain same but you can add additional recipients which you want via the custom rule.
the return should be identity name or names. if you want owner + manager to notify then you have to return list with owner name + manager name. also check if both users have value in email attribute.
If I run and test the rule from IIQ console, audit shows the mail was triggered for both owner and the manager. (Refer line 1 in image)
If I run the task “Check expired Work Items”, which should essentially execute the rule, it only triggers to the owner and not the manager.
(Refer line 4 in the image)
why you have additionalRecipientPresent=false ? it should be true. can you send me the certification definition template or check in your cert def object.