Hi all ,
I'm new to Appian and i'm facing this error .
There is a problem with task “Send E-Mail Notification” in the process “MSL Close Email Notification Process”
Problem: An error occurred in executing an Activity Class.
Details: No valid recipients resolved
Recommended Action: Examine the activity class to correct the error and then resume.
Priority of this problem: High Priority
the process model is like
script task 1 -----script task 2 -------- email smart service
IN script task one the condition is like
rule!MSL_fetchDelegatedUserFromDelegationTable(originaluser :pv!emailRecipientUser) and saved as MST_PM_delegationtable which one is CDT Type
and In script task 2
if(rule!APN_isBlank(pv!MST_PM_delegationtable),pv!emailRecipients,pv!MST_PM_delegationtable.delegateduser[1]) where pv!emailRecipents type is User .
i want to start is Process model can any one help to fix ds .
Discussion posts and replies are publicly visible
Check this
https://community.appian.com/support/w/kb/271/kb-1046-no-valid-recipients-resolved-error-thrown-when-using-send-email
In Script task 1 you are getting recipients by rule!MSL_fetchDelegatedUserFromDelegationTable(originaluser :pv!emailRecipientUser) and storing in MST_PM_delegationtable(CDT),if the rule returns empty data then you are making recipients as pv!emailRecipientsso ,check rule!MSL_fetchDelegatedUserFromDelegationTable(originaluser :pv!emailRecipientUser) is returning data or not if no then then check value is present in pv!emailRecipients.
One more thing pv!MST_PM_delegationtable is single cdt value or array ? if single no need to use index[1]
you can get the user from cdt by pv!MST_PM_delegationtable.delegateduser
Thanks Krishna
we are not getting any value from pv!MST_PM_delegationtable.delegateduser ....
and in pv!emailRecipients there is no value's
then check the recipient user is present in pv!emailRecipients or not,bcz to send email smart service we need to give at least one recipient (recipients cant be empty )
if( and( rule!APN_isBlank( pv!MST_PM_delegationtable ), rule!APN_isBlank( pv!emailRecipients ), ), toemailaddress( "xyz@email.com" ), if( rule!APN_isBlank( pv!MST_PM_delegationtable ), pv!emailRecipients, pv!MST_PM_delegationtable.delegateduser ) )
if both values are empty then send the email to admin group or some one else or you can skip the send email node.
Can I cast the To field value to the emailRecipient type by using the toemailrecipient() function.
toemailrecipient()
such as toemailrecipient( pv!emailRecipients )
if pv!emailRecipients is empty then if you do toemailrecipient( pv!emailRecipients ) also that will return empty value..
so , it wpuld be good to change the type user to anything else or can we manually provide the email address for the particular user which we want to send the emails
if both pv!MST_PM_delegationtable and pv!emailRecipients is empty, then manually provide the email address for the particular user or a group which you want to send the emails
Thanks Buddy :) thanks for the help