Description
By default Verification Operators have a right to close a task with errors and unverified symbols. How can we prevent Verification Operators from closing such tasks?
Solution
To prevent Verification Operators from closing a task with rule errors or unverified symbols you need to:
- Open ABBYY FlexiCapture Project Setup Station;
- Open menu Project→ Project Properties…;
- Select tab Stage tools, select Verification stage and click Edit;
- Click Add event… , select On task close and click Edit script…
- Use the following script as a sample (VBScript):
a. In case you wish to prohibit closing a task with errors:
dim flag_exist
flag_exist = false
for each item in Me.DocumentsWindow.Items
Me.OpenDocument( item.Document )
item.Document.CheckRules()
if (item.Document.HasErrors) and (flag_exist = false) then
CanClose.Value = false
FCTools.ShowMessage("The document has errors! Check them and correct immediately!")
flag_exist = true
end if
Me.CloseDocument( item.Document )
next
b. In case you wish to prohibit closing a task with unverified symbols:
dim flag_exist
flag_exist = false
for each item in Me.DocumentsWindow.Items
Me.OpenDocument( item.Document )
item.Document.CheckRules()
if (not item.Document.isVerified) and (flag_exist = false) then
CanClose.Value = false
FCTools.ShowMessage("The document has unverified symbols! Please, verify all the symbols before closing the task!")
flag_exist = true
end if
Me.CloseDocument( item.Document )?
next