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

# CloseTaskEx

> CloseTaskEx Web Services API メソッドを使用して、タスクを後続の処理に戻し、ドキュメントを処理ステージにルーティングします。

<div id="what-it-does">
  ## 機能
</div>

タスクを後続の処理のために返します。このメソッドは、以前のバージョンの Web Services API の [CloseTask](/ja/flexi-capture/api/methods/close-task) メソッドに代わるものです。

Web Services API を使用してドキュメントをルーティングする場合、開始条件やスクリプトなどの他のルーティング方法は適用されません。例外は [User type](/ja/flexi-capture/api/structures/t-processing-stage-type) (ID=2000) のステージで、前処理と後処理が常に実行され、ワークフローも正しく動作します。

タスクを閉じた後にドキュメントを特定のステージに送信する必要がある場合は、タスク XML ファイルで次のステージを明示的に指定します。Verification Postprocessing にタスクを送信する際は、`RoutingInfo.xsd` スキーマをタスクにアタッチします。このスキーマには、ドキュメントの送信先ステージや作成する必要があるタスクなどの情報が含まれます。ドキュメントの認識時に照合する Document Definitions を指定することもできます。

ドキュメントを特定のステージに送信するには、[SendTask](/ja/flexi-capture/api/methods/send-task) メソッドを使用することもできます。

<div id="definition">
  ## 定義
</div>

```csharp theme={null}
void CloseTaskEx (int sessionId, int taskId, int stageType);
```

<div id="parameters">
  ## パラメーター
</div>

| 名前          | 型     | 説明                                                                                                                                                                                |
| ----------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sessionId` | `int` | Application Server への接続 ID                                                                                                                                                        |
| `taskId`    | `int` | 後続の処理のために返すタスクの ID                                                                                                                                                                |
| `stageType` | `int` | タスクの送信先となるステージタイプの ID。使用可能な値については、[ProcessingStage](/ja/flexi-capture/api/structures/t-processing-stage-type)を参照してください。タスクを後続の処理に戻すには、`stageType` の値を `410` または `510` にする必要があります。 |

<Note>
  Data Verification ステージでは、変更内容がタスクに保存されます。変更内容を documents に反映するには、POST リクエストを使用してタスク データを含む XML ファイルをアップロードし、タスクを閉じる際に Data Verification Postprocessing ステージに送信します。
</Note>

<div id="returned-value">
  ## 戻り値
</div>

ありません。
