This question is a follow up of this one here: http://www.capturedocs.com/thread/send-e-mail-notifications-on-validation/ The goal is the have a script fired after a document goes to Exception state. Currently the only workarounds for this case are exporting documents to folders and checking them with a third-party software (PRTG, Windows Service, etc.). This is a big overhead compared to scripts executed at specific stages within FlexiCapture.
I wrote the following SQL query to query the database for batches in exception state.
b.[Name] as BatchName,
p.[Name] as Stage,
[dbo].[Batch] b left join
[dbo].[ProcessingStage] p on b.[ProcessingStageId] = p.[Id]
p.[Name] is null or p.[Name] IN ('Exceptions')
This script can be used to query the states without using the file system. I am still not satisfied and looking for a solution using the integrated scripting. Can someone point me in the right direction or should this be a feature request?