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

# CancelTask

> Cancel the processing of a task with the CancelTask method of the ABBYY FlexiCapture Web Services API, identifying the task by its ID.

## What it does

Cancels the processing of a task.

## Definition

```
void CancelTask( int sessionId, int taskId );
```

## Parameters

| **Name**  | **Type** | **Description**                                    |
| --------- | -------- | -------------------------------------------------- |
| sessionId | int      | The ID of the connection to the Application Server |
| taskId    | int      | The ID of the task to be canceled                  |

## Returned value

None.
