> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring document processing settings

> Set up batch type image processing and a post-verification custom script stage in ABBYY FlexiCapture that flags whether a document passed Verification.

Set up processing settings for specific Batch type (**Project** > **Batch types**... > **Edit**... Batch type) or for default Batch type in the **Project Properties** (**Project** > **Project Properties**...)

1. In the **Image Processing** tab choose option **Create document for each image file,** if you need to process image files. Or **Create document when Document Definition is applied** option to process files in document formats (e.g. \*.txt, \*.doc).

2. Click **Project → Project Properties...** and go to the **Workflow** tab.

3. Set the **Schema** parameter to **Advanced**.

4. Select the **Verification** stage, create a custom script stage and tick the **Enable web stations** option on the **General** tab. Click **OK** button.

5. On the **Workflow** tab in the project properties window click **Stage...** button.

6. In the **Create Processing Stage** window select **Automatic** base setting and click **OK**.

7. On the **General** tab in the **Workflow Stage Properties** dialog window enter the name for the custom script stage (for example, *Post Verification Script Stage*).

8. Untick the **Wait for all documents of a batch** option and tick the **Linked to previous** option.

9. Go to the **Script** tab of the same dialog window. Set the **Type** parameter to **Document processing** and click **Edit script...**.

10. Enter the following script:

```
Document.Properties.Set("WasVerified", bool.TrueString);
```

This script adds a registration parameter to the document that indicates whether the document was in the verification stage or not.

11. Go to the **Entry Conditions** tab and select **Under these conditions:**. Click **Rule...**.
12. In the **Rule Settings** dialog enter the name of the rule into the **Name** field (for example, *Previous stage was Verification*). Set the **Condition type** parameter to **Script** and click **Script...** button.
13. Enter the following script:

```
Result.CheckSucceeded = (Document.StageInfo.StageName == "Verification Postprocessing" || Document.StageInfo.StageName == "Verification");
```

This script determines the condition of entering the verification stage. If the previous stage was verification, the document will get the "WasVerified" registration parameter. On the next stages, this parameter will allow to determine whether the document was on the verification stage or not.

14. Click **OK**.
