Need to conditionally display section only on successful a!queryEntity results

I have an application database that is unreliable in its availability.  The UI rule that calls the expression rule works great when the db is available, but fails often with the message Expression evaluation error at function a!queryEntity [line 38]: An error occurred while retrieving the data. 

I want to be able to not display this section if the expression rule call fails and instead put a message like "the database is currently not available, please try this again in the future" rather than have the alarming pink message display.

Is there a best practice or design pattern I can refer to that handles this? 

  Discussion posts and replies are publicly visible

Parents
  • 1. There is no exception handling mechanism in SAIL.
    2. So developers rely on doing the checks in if(). And checking for null, empty output from SAIL expression evaluation.
    3. The above is an error because when database connection is not available, SAIL expr. evaluation fails. Catching this exception is somethings that we would do in a traditional programming language.
    4. If we had some function to check if the datastore connection is available - we could wrap this in a if() and avoid the exception on the UI. Technically the above error is an exception and Appian stops the SAIL evaluation immediately. The only way I see we can handle such scenario is by creating some external webservice/ping the database hostname:port to find if its running. Frankly - that is too much of effort.
Reply
  • 1. There is no exception handling mechanism in SAIL.
    2. So developers rely on doing the checks in if(). And checking for null, empty output from SAIL expression evaluation.
    3. The above is an error because when database connection is not available, SAIL expr. evaluation fails. Catching this exception is somethings that we would do in a traditional programming language.
    4. If we had some function to check if the datastore connection is available - we could wrap this in a if() and avoid the exception on the UI. Technically the above error is an exception and Appian stops the SAIL evaluation immediately. The only way I see we can handle such scenario is by creating some external webservice/ping the database hostname:port to find if its running. Frankly - that is too much of effort.
Children