Actions based on database writes

Hi All,

I have written a system to automatically output our survey responses to a pdf file and uploaded to our project management system. For surveys that include a large number of photos, I encountered an bug in my system where not all of the images where getting inserted into the PDF even though they are all there in the database when I go back to check. Yes I know this is my issue, BUT I was wondering if there was table that had an entry with the status of the upload and processing of the survey?

I am using a Postgresql trigger on the *_CORE table to trigger the PDF creation, but I suspect that basically my system is moving too quickly and outputting the PDF before the image entries on their various tables are finalized in the database. Is there a table that has the status of the database write for the specific survey?

Right now my only workaround is to add a delay in the PDF creation for a set time (60 seconds seems to work the best) but I would prefer to check the database every few seconds to see if the survey has completed uploading in case there is a delay or ideally things could be moving faster.

Thanks!

Just to give an update.

I believe that I found the column that I was looking for. In the *_CORE table the column _Marked_As_Complete_Date coincides with the end of the Tomcat log for the submission, so I am going to assume that this is what I was looking for. I assumed this was when the surveyor finalized the form however this is actually when the server marked the submission as complete apparently.

1 Like