Have a requirement to send email notification to multiple emails from workflow. As per the given requirements have derived the emails and concatenated with comma (,) and passed to the API createadhocrole to create.
lRoleEmail has value as firstname.lastname@example.org,email@example.com
wf_directory.CreateAdHocRole(role_name => lRoleName,
role_display_name => lDisplayName,
language => 'AMERICAN',
territory => 'AMERICA',
role_description => NULL,
notification_preference => 'MAILHTML',
role_users => NULL,
email_address => lRoleEmail);
A new role is getting created but there is no email sent.
Created a new attribute of role type and in the notification function have assigned the same as the performer.
The NOTIFICATION_PREFERENCE in WF_ROLES table is DISABLED for the new role.
If anyone came across same issue please let me know to to achieve this.
Thanks in advance.
You need to provide the correct email address but not the dummy address like 'firstname.lastname@example.org,email@example.com'. One more thing you can give only email address per one user or role. You cannot assign multiple addresses, if you do also it treats the entire string as one email address only.
After changing the email address, modify the notification preference to MAIL* and then send a notification.