Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
1807 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Any way to trap a DB Connection Error when running a QueryEntity Rule? I am popu
dsmithgxp
Certified Associate Developer
over 7 years ago
Any way to trap a DB Connection Error when running a QueryEntity Rule? I am populating a process variable in a script task by calling a QueryEntity expression. I would like to trap a connection error so I can retry after a couple minute instead of having the script task just fail altogether
OriginalPostID-218123
OriginalPostID-218123
Discussion posts and replies are publicly visible
0
Stefan Helzle
A Score Level 3
over 7 years ago
I do not know of any way to achieve that. If SQL is OK for you then you could use the "Query Database" smart service. It can be configured to not halt on errors but returns an error flag you could react on.
Can you explain your use case?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
dsmithgxp
Certified Associate Developer
over 7 years ago
I thought of that but thanks for the input. It just seemed to silly to add the DB node to do a connection check if there was an easier way. I am calling a view which calls a separate DB. If they take it down for maintenance I didn't want the process to require manual intervention to restart nodes. It seems like the queryEntity function should accommodate for SQL errors code returns but I wasn't able to see a way.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
As far as I know, there is no direct way to trap the DB connection errors, we can wrap the script task which calls the QueryEntity rule in PM, use new PM as a subprocess and configure exception flow for the subprocess. This exception flow can be timer bassed. Take the exception flow can be used do necessary steps (Sending email/alert or retrying)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel