Skip to main content
May 31, 2024
Question

show custom message when a!startprocess when called from an interface fails

  • May 31, 2024
  • 6 replies
  • 0 views

I am using a!startprocess function from an interface to save some data to db, now lets say the process model being called encounters a run time error in some node, i need to show the user some custom message like ' some error occured' in the interface , onError dosent work here , as there was no issue starting the process.

6 replies

stefanhelzle0001
May 31, 2024

Using activity chaining, you can control at which step in the process the a!startProcess function returns. Did you try this?

May 31, 2024

havent tried this , but my understanding was the behavior of how onError works, from the Docs: "The onError parameter will only evaluate if the process fails to start. It will not evaluate if a node in the started process pauses by exception" 

stefanhelzle0001
May 31, 2024

Sure, but with some clever design of process variables and value setting, you should be able to return such a message to the user when evaluating onSuccess.

davidj137213
May 31, 2024

Wait for a process response, as a variable.. and after that, with refresh variables, control the behavior of the interface, and depending on the value received from the process, show the message or not.

mathieud0001
May 31, 2024

This is an example that I like to refer to for handling errors with a startProcess in an API but the method would be very similar:  https://community.appian.com/discussions/f/process/20396/status-code-of-a-webapi-to-start-process-model