HI all,
How can we show any exception on the User Interface if we are using any smart functions like a!writeToDataStore or a!startProcess.
AFAIK i know every smart function have attributes like onSuccess, onError which can be used to display the meaningful data when smart function evaluates successfully or if some error occurs simultaneously,
but how to display if some exception has occurred.
Thanks
gauravs0002
Discussion posts and replies are publicly visible
In case I need to show a success or error message to the user, I create a local variable and use that in the showWhen parameter of a box layout. Then I can control the display of this box in onSuccess or onError. Give the box layout an info or warning style.
Hi Stefan,
onSuccess or onError only show the message if the function evaluates successfully or if it fails respectively.
My question is how to display on user interface if any Exception has occurred,
Once the you have captured the response of Success or Error in a local variable, you can conditionally show a display component based on the value in that local variable.
Have richtext or textfield component which displays only when the local variable is not null and it can display the value in the local variable or you can customize it the way you want the end user to see it.
Hi Siddharth,
Response of Success or Error are only captured if process gets completed or gets failed.
I want to to let end user know if some exception has occurred.
If I understand correctly, you need to notify the end user with system exceptions (not business exceptions)
For this, you can move the potential nodes to sub-process and implement the exception handling at parent. Even sub-process has exception, parent process is still active. So, you can break the activity changing in parent process with help of timer node. Before breaking the activity chaining, you need to capture the right information about the exception (this is design time) in process variable. Once you done with this, you can access this message from function variable fv!processInfo and then show to end user
I hope this will help.