Show Exception on User interface

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 onSuccessonError 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

  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.

    • The "onError" parameter will only evaluate if the process fails to start. It will notevaluate if a node in the started process pauses by exception.

    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.

  • You can raise a manual notification every time that you have a technical error. One scenario is create an Expression Rule to process the error in the object that you are going to monitor and throw an exception error. And another way is if you are working with a process, connect the node that you need to execute (if it's not sync) to an AND and if in case that you have and error in the node that you need to control, put a trace in your database or create another Task to the department that you need to notify.

    There are a lot of possible scenarios, if you give us more details we can help you with a better scope! Slight smile

  • Hi ,

    Were you able to show any message ? My requirement is also same. i AM using a!writetodatastore in my interface and I want to show a prompt like "Data saved successfully" on click of submit button . Or if it fails " Data submit failed" , something like that.