How to prohibit Verification Operators closing a task with rule errors or unverified symbols?

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:

  1. Open ABBYY FlexiCapture Project Setup Station;
  2. Open menu Project→ Project Properties…;
  3. Select tab Stage tools, select Verification stage and click Edit;
  4. Click Add event… , select On task close and click Edit script…
  5. 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

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed