I am wanting to create a custom workflow stage that inserts information about the documents into a SQL database table. I would like to write field information for invoices, such as the InvoiceNumber, InvoiceDate, Total, Vendor, etc. Has anyone done this before or knows how to do it? If so, would you mind sharing the steps to accomplish this?
How to add a Workflow Stage that will write data to a SQL table?
Was this article helpful?
0 out of 0 found this helpful
Comments
2 comments
If I understand you correctly, then after processing the documents you need the information to be recorded in the database, right?
In general the script works like this.
After processing the documents, if the database already has a record from this document and this is checked through the service field, then a new record will not appear, and if there is no such service field, then a new record will be added.
The screenshot shows how I sent 2 different document definitions for processing, one condition worked and wrote a record to the database, and the other document had a different definition for which I did not have a condition and, accordingly, there is no record either. But at the same time, the record that was added, and if I submit this document for processing again, then after recognition the record will not be added to the database.
I hope I understood you correctly and if any problems arise, I will try to help you
By the way, it would be better to get the base path through Project->Properties->Environment Variables
since you will add the base path in one place and call it wherever you need it, and if you transfer the project to another server, you will have to change the path only in one place
Here are the links for this method
1.https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/environment_variables/
2.https://support.abbyy.com/hc/en-us/articles/360012558260-How-to-use-environment-variables-with-FlexiCapture
3.https://support.abbyy.com/hc/en-us/articles/5019943260819-How-to-access-project-environment-variables-from-the-stage-script
4.https://support.abbyy.com/hc/en-us/articles/15242213538963-How-to-use-an-environment-variable-to-set-an-export-path
5.https://support.abbyy.com/hc/en-us/articles/10744746851347-How-to-configure-database-connection-via-environment-variables
5.https://support.abbyy.com/hc/en-us/articles/5517387769875-How-to-use-environment-variable-as-a-path-to-the-Hot-Folder-in-the-Image-Import-Profile
Please sign in to leave a comment.