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
  • An error occurred while retrieving the data : You'd usually get this when there is time out when retreiving data from DB
    In appian-mysql-ds.xml file - try modifying <timeout> and increase {not suggested though}.
    My suggestion is to probable create a view or increase the performance of the table of the query
  • 0
    A Score Level 1
    in reply to ashish kanchi
    The OP mentions that the rule is working fine when DB connection is available. But fails when the DB is not running. The error that the OP is getting is not due to some timeout. The error can indicate any number of possible things - database may not be running, query maybe incorrect, table may not exists so on.

    In this case however, OP has mentioned that the error is coming when the database connection is not available. Increasing the database timeout is not going to help in this case.
Reply
  • 0
    A Score Level 1
    in reply to ashish kanchi
    The OP mentions that the rule is working fine when DB connection is available. But fails when the DB is not running. The error that the OP is getting is not due to some timeout. The error can indicate any number of possible things - database may not be running, query maybe incorrect, table may not exists so on.

    In this case however, OP has mentioned that the error is coming when the database connection is not available. Increasing the database timeout is not going to help in this case.
Children
No Data