Error handling for missing file download

1
Hi, I'm trying to set up error handling for a missing file upon performing a file download of a specialization of the System.FileDocument called InvoiceDoc. In my situation the actual (PDF) files are missing in my DB due to copying of a test-database, however the InvoiceDoc is available. I'd expect the errorhandler below to catch a missing file error but unfortunately it is not. Resulting upon executing this MF when the file document is missing: Is there any way to catch the missing file error? Thanks in advance, Kelvin
asked
2 answers
2

I did not test it myself but you might try a workaround by using the community commons getFileSize first and check if it is zero.

Regards,

Ronald

 

answered
0

Hi Kelvin,

Perhaps you figured it out already by ourself, but in the case that the file (in your app console) is missing but the UUID is filled, the proposed solution will not work. Despite both the HasContents is True and Size > 0. To trigger a error handler, put a ‘encode64’ java action in the flow decoding the file you want to check with an error handler on it. You can set the ‘use return value’ to false. This action will fail in aforementioned case and therefore solve your problem.

answered