Hi,
i have problem with invoice recognition when using multiple document definitions in one project. So i have 9 different templates created in FlexiLayout. For each of these templates i have separate FC project with document definition and it is working fine. So i wanted to create one project that will include those 9 document definitions together. With two document definitions that has different FL templates, it correctly recognizes invoices with different type. When i add the third document definition, then it won't recognize invoice with the first document definition template. Any ideas why it is happening?
Comments
4 comments
Hello,
I am sorry for keeping you waiting for so long. The reason of what is happening is that according to Your FlexiLayout project the third document definition can be applied to the problematic document with more "accuracy" that the first one.
The right way to resolve this issue is to create a classification project in FlexiLayout, that will distinguish between your document definitions. Please see the article "Program settings > Classifier" of the help file.
If any complications arises during the classifier development, please send us:
1. Your FlexiCapture version (Project Setup Station > Help > About)
2. Your classifier project
3.Problematic documents
Hi,
thank you for your suggestions, but unfortunately it didn't resolve the issue.
However i found the issue and fixed it. The issue was that each FlexiLayout project uses text files to locate elements and for each FL project, these text files has the same file name. The issue is when you create new document definition and publish it, the FC project stores these text files in the: projectRootDir/Templates location and the last published document definition will overwrite text files with the same file name. Therefore previous published document definitions will fail to locate elements as text file content has been changed.
So why does FC project stores text files in the projectRootDir/Templates/ location for the all document definitions, but not in separate locations i.e. projectRootDir/Templates/DocumentDefinitionName/?
Also i did some tests with FL project and you can produce the same issue with duplicated filenames that are located in different places for each FL alternative, but when you try to export this FL project, then it will throw warning that can't export txt file as in export location this file name already exists. Why exported FL project with different alternative layouts store text files in the FLProjectNameRes/ folder, but doesn't separate by FL alternative names?
Hello,
The reason for this is you can use the same text files for multiple document definitions. This is actually described in the help:
Here is the excerpt from the article "Elements > Specifying databases and text files in the FlexiLayout language" of the FlexiLayout Studio Help:
A text file is accessed by file name, which is specified relative to the folder that contains the FlexiCapture Studio project. Each search string must start on a new line. Empty lines are ignored.
When you export a FlexiLayout in order to add it to a document definition in ABBYY FlexiCapture, the text files are copied to the folder < FileName>Res, where FileName is the name of the FlexiLayout file or classifier file. This folder is placed in the same folder that contains the exported file. When you subsequently import a FlexiLayout, ABBYY FlexiCapture will place the text files into appropriate folders automatically.
And there is a note in the article "ABBYY FlexiCapture for Invoices > How to set up an invoice capture project > Capturing additional invoice fields > Special features of ABBYY FlexiLayout Studio for creating additional FlexiLayouts" of the Administrator's Help of FlexiCapture
When importing a FlexiLayout with text files that contain possible field values, the program uses the relative paths that were defined when creating the FlexiLayout. The relative paths are relative to the project file.
To place the file in another folder, for example "data", create a folder "data" in the FL project and access the file as "data\file.txt".
This way after import the file will be placed in projectRootDir/data/file.txt
Note, that when you export FL project, the txt file will be placed in <FileName>Res folder and anfter import moved to specified location.
Hope it helps
Please sign in to leave a comment.