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

# GetCurrentTask

> Return the ID of the current task for a session with the GetCurrentTask method of the ABBYY FlexiCapture Web Services API, using the connection ID.

## What it does

Returns the ID of the current task.

## Definition

```
int GetCurrentTask( int sessionId );
```

## Parameters

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

## Returned value

| **Type** | **Description** |
| -------- | --------------- |
| int      | Task ID         |
