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

# OpenTask

> OpenTask method in the ABBYY FlexiCapture web services API opens and locks a task for further operations so other users cannot access it at the same time.

## What it does

Opens a task for further operations on it. All tasks which are not opened by another user at the moment are available. The task gets locked (i.e. other users cannot open it).

<Warning>
  You must open a task before performing any operations on it.
</Warning>

## Definition

```
bool OpenTask( 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 opened                    |

## Returned value

| **Type** | **Description**                                               |
| -------- | ------------------------------------------------------------- |
| bool     | A flag that shows whether the operation was successful or not |
