> ## 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.

# 文書処理設定の構成方法

> ABBYY FlexiCapture で、バッチタイプの画像処理と、ドキュメントが Verification を通過したかどうかを示す検証後のカスタム スクリプト ステージを設定します。

特定のバッチタイプ (**Project** > **バッチタイプ**... > **Edit**... Batch type) または **Project Properties** の既定のバッチタイプ (**Project** > **Project Properties**...) に対して、処理設定を行います。

1. 画像ファイルを処理する必要がある場合は、**Image Processing** タブで **Create document for each image file,** オプションを選択します。ドキュメント形式のファイル (例: *.txt、*.doc) を処理する場合は、**Create document when Document Definition is applied** オプションを選択します。

2. **Project → Project Properties...** をクリックし、**Workflow** タブに移動します。

3. **Schema** Parameter を **Advanced** に設定します。

4. **Verification** ステージを選択し、カスタム スクリプト ステージを作成して、**General** タブの **Enable web stations** オプションをオンにします。次に、**OK** ボタンをクリックします。

5. プロジェクト プロパティ ウィンドウの **Workflow** タブで、**Stage...** ボタンをクリックします。

6. **Create Processing Stage** ウィンドウで **Automatic** をベース設定として選択し、**OK** をクリックします。

7. **Workflow Stage Properties** ダイアログ ウィンドウの **General** タブで、カスタム スクリプト ステージの名前を入力します (例: *Post Verification Script Stage*) 。

8. **Wait for all documents of a batch** オプションをオフにし、**Linked to previous** オプションをオンにします。

9. 同じダイアログ ウィンドウの **Script** タブに移動します。**Type** Parameter を **文書処理** に設定し、**Edit script...** をクリックします。

10. 次のスクリプトを入力します。

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

このスクリプトは、ドキュメントが Verification ステージにあったかどうかを示す登録パラメーターをドキュメントに追加します。

11. **Entry Conditions** タブに移動し、**Under these conditions:** を選択します。**Rule...** をクリックします。
12. **Rule Settings** ダイアログで、ルール名を **Name** フィールドに入力します (例: *Previous stage was Verification*) 。**Condition type** パラメーターを **Script** に設定し、**Script...** ボタンをクリックします。
13. 次のスクリプトを入力します。

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

このスクリプトは、検証ステージに入る条件を判定します。前のステージが検証だった場合、ドキュメントに "WasVerified" 登録パラメーターが付与されます。後続のステージでは、このパラメーターを使って、ドキュメントが検証ステージを経たかどうかを判定できます。

14. **OK** をクリックします。
