Connection DB in ReFramework

How can you validate the connection status of our database? I mean mainly the use of the connection in the ReFramework. At the very beginning, in init we initialize the connection and in the end block we disconnect. What if there is a sudden interruption with the database between the get transaction block and the process? the robot will report errors in the logs, but it will download further transactions. What’s the best way to prevent this from happening?

I thought that before each downloaded transaction, call the query: SELECT 1 FROM DUAL and check if there are any problems, if so, finish the whole process.

Somewhere on the forum I saw people checking DB connection object is not nothing, but are we guaranteed that our variable will be null after an error?

Hi @mican

I think you can handle it around

Like in default/normal reframework, when a system exceptions happens, it normally goes to Init state, so you can make the Init state in such a way that it would check the connection status and if it is disconnected, then make a sequnce to connect it again when system exception happens

You can design more out if needed.

Hope this idea helps you
Nived N
Happy Automation

What if the whole process is successful and adding a status in the set status transaction - Success block will be unsuccessful? Then the robot will not go to init block.