Reading through the Query Database Smart Service documentation, it appears that an explicit transaction wraps every execution:
https://docs.appian.com/suite/help/22.2/Query_Database_Smart_Service.html#:~:text=Activity%20execution,by%20the%20node
Is there a way to shut this behavior off? We have created a logging framework with all of our procedures, and can even get the error messages we're producing out of the process flows via the Outputs tab, but when all is said and done our logging messages are missing. If I'm interpreting the above correctly, it's because the overall transaction is rolling back our logging inserts too.
I'd really prefer to let errors be errors and just stop this behavior, but if that's not possible my catches will have to swallow the error and return my messaging through OUTPUT variables instead (an idea if anyone else is facing this same issue).
Thanks!
-Eric Rubeck
Discussion posts and replies are publicly visible
Can you explain your use case a bit? What do you want to achieve?
In general, I consider the Appian process model to define the "transaction", but not the DB. From an Appian perspective, the DB is just a dumb data storage. Thinking of it like this works for me very successfully for the last 12 years.
We're building enterprise-level logging and status reporting that will cover more apps than just what we have in the Appian environment, so the plan is to centralize our logging into SQL Server.
We are using our own SQL Server instance as our data source, not the provided MariaDB instance. So the use case is simply to be able to leverage writes to a logging table without another round-trip to the DB.
At which level do you want to log and about what kind of status do you mean? I think this approach might be worth being adapted to the way how Appian works.
If our procedures have errors due to bad parameters, etc, we're attempting to log the failure. This helps with investigation and trending, and allows us to event those errors to a PowerBI reporting/alerting solution.
Your response tells me enough, likely I will just need to change my approach and complete successfully but indicate failure instead of allowing the procedures to fail.
You mean stored procedures? I try avoid them at almost all cost.
Bad parameters? Could you add a validation in Appian? Did you know that you can make a process halt by exception using the error() function?