Hello all, I'm using Smart Fields for invoice capture now and I'm running into an issue. I have the on-prem version so I'm using a workflow to apply the template to a document and then wait for entry change to finish the processing. It works most of the time but today I noticed that my workflow is averaging over 2 hours. That didn't make sense because most of the time, it only takes a couple of minutes. I found the issue. Some of my invoices are not getting the data extracted. I have workflows that are running multiple days, waiting for the entry change. I checked the AI service in the admin console and it doesn't even show the processing jobs. That makes me belive they are timing out.
I can obviously put some sort of catch timer in my workflow, but my real question is why/when does smart field timeout?
Discussion
Discussion
Smart fields not finishing
The AI service does not wait for jobs to finish (for automated extractions where there's no user present). It queues them up for execution and checks on them later.
I am seeing a few failed jobs for your hybrid account in the past week, but we would need more information to track it down. Could you contact your reseller to open a case with Laserfiche Support?
- How many invoices have failed to process?
- What were the rough timeframes when the job was attempted?
- If possible, please attach a briefcase with the template definition and the documents that did not process to the support case
The AI service has additional logging that may help us narrow down the issue. If you look in <Program Files>\Laserfiche\AIService\Config\AIServiceConfig.xml, change the EventLogLevel from "Informational" to "Debug", save the file and restart the service.
The updated config file should look like this:
<AIServiceConfiguration SchemaVersion="1"> <LoggingOptions> <EventLogLevel>Debug</EventLogLevel> <EventLogDirectory></EventLogDirectory> <MaxLogAgeDays></MaxLogAgeDays> </LoggingOptions> </AIServiceConfiguration>
It will start logging to <ProgramData>\Laserfiche\AIService\EventLog. By default, the service will remove logs older than 7 days. You can set a different retention using MaxLogAgeDays in the config file above.
You shouldn't have to try to reproduce the issue after turning on logging if you can provide a briefcase with sample docs that failed.
Where do I restart the service? I don't see an LF AI service running on my LF server.
Apologies, it's a web service. So either stop and start the LaserficheAIServiceAppPool app pool in IIS , or IISreset.
Ok, thought so. I got some logs and sent them to my provider, who opened a case. Thanks.
@████████ I found the issue. For some reason, if my invoice has a blank page as the last page, SF will not work. As soon as I deleted the blank page and restarted SF on the document, it worked. Why would a blank page cause SF to fail?
Yep, that is the issue, one of our components did not expect empty responses from the OCR service
. Just needed to see the doc to confirm what our logging was showing. We should have a fix for it in a couple of days, no changes to the locally installed components.
As a matter of best practice, I would still add a timer to the workflow and kick these docs to a user for manual data entry if smart fields did not get them processed after a day.
A fix for this issue was deployed. Please let us know if the issue persists.