How to deal with exeptions or errors in appian. I would like to show a custom error message to the user instead of technical terms. At the same time , the errors with specific technical terms must be logged into a file ,so that the relevant team can look into it. So how do i do these two things, Custom error message and Error logging .
Thanks,
Discussion posts and replies are publicly visible
But the send email smart service is breaking when i give invalid recepient emails and i see a red line on monitoring.So its not going to the next node where i check the process variable value.
In what way is your email address 'invalid'? You should be adding validation to the form where you're capturing those email addresses so that they at least conform to a valid email address format (they may still not be viable email addresses but there's no way of knowing that before you send them!!). You can do this by adding a validation to the field where you capture the email address. Use the fn!regexmatch() - you'll need to add this as a plug-in - and there are any number of regex patterns out there to validate the email address format.
So what does the output in send emaill smart service give then? It will be just saying if its a viable email? So, for incorrect format ,its going to break?
When I provide an invalid email address I see this as the Data Outputs:
Sorry for the late reply, but somehow this smart service is breaking for me.I have attached screenshots below. Any help is much appreciated, thanks.
What is the error? If you right-click the node that is in error you'll get a menu. Select the "1 instances" option, highlight the node in the list and then select the 'View Node Details': You should land on a dialogue with an 'Error' tab selected where the details of the error are, a bit like this:
Here is what i got
Ok, so looks like the Send E-Mail node expects to have at least ONE valid recipient. I guess if you had one valid email address and one invalid one it would work (worth trying that out).
But as I said previously if you're capturing the email addresses in your first User Input Task then you should add validation to the field(s) where you're capturing the email addresses and not let the User submit the form if the email addresses are invalid.
Yes you are correct, it did go to the exception flow when one mail was valid in the send email smart service node. But that's bad as we might be loading a group of recepients from a cdt and it's not guaranteed that atleast one will be valid all the time.
Thank you , anyway.
So, even in this circumstance you should write a rule to validate the format of the email addresses and route to someone to fix/remove BEFORE the Send E-Mail smart service is invoked. If you encapsulate this as an Expression Rule you can use it in the Process, AND you can re-use it in any interface where you're capturing Email addresses. And it's just good practice to validate the data you're working with before passing it downstream for processing.