Exception ,Error handling, showing custom error messages

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

  • The answer is that it depends on the context. Some errors are handled automatically by Appian and do not give you the ability to implement a try/throw/catch pattern. Other errors do. So ti really depends on what objects you're using and what the nature of the "error" is that you want to catch and provide a user-friendly display of.

  • Lets say for a send email smart service , I want to display a user friendly message when the email is not sent or for invalid email address.

    Another situation will be , a user doesnt have privelege for a page or some page had error in opening up . In this case I saw the error page given by appian by default had all technical details instead of a user friendly message. 

    So like these scenarios, is it possible to handle them with a custom errror message

  • So if apian allows the ability to implement try,throw cach pattern for some errors, How do i do it? 

    And any insights on error log for  a application.

    Thanks 

  • Hi Naresh - remember where I said it depended? SO, for your second question on the Send E-mail Smart Service, you can configure the Data Outputs:

    You would have to map the values you want to test to pv!s and then test them and then route to a User Input Task where you can display the results of your Send E-mail task. Whether you always route to this User Input Task or only when there are errors is for you to decide/design.

    The other examples you asked about (user permissions error on a page or a technical error in a page) then, no, currently there is no try/throw/catch available.Both of these are errors that should be caught by testing (that is, you shouldn't have a Production instance of either of these if your testing was comprehensive enough and caught all these possibilities)...but with the best will in the world some defects will make it through. And, yes, it would be useful to be able to show user-friendly error messages at the front-end, and at the same time raise alerts to the relevant Technical Support Team, and in many cases this is currently not possible. This capability is on the Appian Features backlog but no specific release targeted AFAIK..

  • Thank you so much, So can we take it like , for smart services , the possible errors can be tested from their node outputs? There isnt any error that will not fall into the categories in the node outputs? If thats the case, then its fine. 

    And any insights on application log?

    Thanks in advance

  • I'll say it one more (with feeling!)...it depends. Some Smart Services do not provide you the option to test whether they succeeded or not, they simply throw an error (you'll see a red line through the Smart Service in the process monitor) and the error is caught internally via the Alert that you've configured. Some, like the Send E-mail Smart Service, have outputs that you can determine their success (or otherwise).

    In answer to your second question, if a Smart Service "red lines" then that Process Instance is suspended at that point, the Support Team will be made aware and everything they need to know can be found by opening up that process Instance. If you can 'catch' any error then it'll pay to have a generic 'Error Handling' application that you can write the details of the error to and give the Technical Support Team access to this application...

  • Ok thank you , In your  previous answer , it's about routing to a user defined task but my requirement is kind of different.

    I have a page where user can enter recepient mail address. Once he submits , the process model takes the flow to the send email service, here if any error occurs in sending email, I must show a alert  to the user stating , send email has failed or some user friendly message.

    So routing to a new task wont help in my case.

    Is there any solution for this , thanks  in advance(with feeling!)

  • Yes. If you make the whole process synchronous (so you 'chain' the first User Input Task, the Send E-mail Smart Service and the next User Input Task) then the end-user will see the results of the send email immediately.

  • But the results are going to come as a task right. Will it come in the same screen of the first task like alert?

    Will try it anyway , thanks

  • When you chain Smart Services together you get a 'synchronous' experience - so if your first screen is where you input some email addresses, then submit it'll run the Send E-Mail synchronously in the background and then immediately display the next User Input Task, so the experience the User will get will be the first screen and the immediately the second screen.