I'm using database logging with a custom schema and stored procedures to log my test results. The stored procedures must be called in a certain order during the same session because session variables are used to store some foreign keys. This improves database security by hiding keys from the application. The problem is that I don't know how to make sure the stored procedures are executed in the right order. The order should be:
1. open_sequence()
2. add_step_data() repeat for each step result
3. close_sequence()
Any suggestions? I tried putting the open/close stored procedures in separate steps in the Log to Database sequence, but in that case I have to open a separate database connection, so the shared session variables don't
work on the database side. If there is a way to share the connection, that might be another solution.