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

# Task

> Task data type in the ABBYY FlexiCapture Web Services API: fields describing a task, its batch, status, priority, timestamps, assigned user, and flags.

## What it does

The **Task** data type stores information about tasks.

<Note>
  Besides records of this type, information about tasks is also stored in XML files. An XML file may describe the entire task or its separate files. See the [Working with files](/flexi-capture/api/files/files) section for information about the structure of data in files and working with files.
</Note>

## Fields

<table width="100%"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>Id</p></td><td><p>int</p></td><td><p>The ID of the task</p></td></tr><tr><td><p>ProjectId</p></td><td><p>int</p></td><td><p>The ID of the project to which the task belongs</p></td></tr><tr><td><p>BatchId</p></td><td><p>int</p></td><td><p>The ID of the batch which includes the documents of the task</p></td></tr><tr><td><p>BatchTypeId</p></td><td><p>int</p></td><td><p>The ID of the batch type. 0 corresponds to the "Default" batch type</p></td></tr><tr><td><p>Priority</p></td><td><p>int</p></td><td><p>Task priority. Possible values: see <a href="/flexi-capture/api/structures/t-priority">Priority</a>.</p></td></tr><tr><td><p>Status</p></td><td><p>System.UInt32</p></td><td><p>Task status. Possible values:</p><ul><li><strong>0</strong> - being created</li><li><strong>1</strong> - awaits processing</li><li><strong>2</strong> - being processed</li><li><strong>3</strong> - processing completed</li><li><strong>4</strong> - postponed</li></ul></td></tr><tr><td><p>CreationTime</p></td><td><p>long</p></td><td><p>Time of creation. To convert values, use the following methods (C#):</p><pre><code>DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();</code></pre></td></tr><tr><td><p>ModificationTime</p></td><td><p>long</p></td><td><p>The time when the task was last modified. Use the following methods (C#) for conversion:</p><pre><code>DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();</code></pre></td></tr><tr><td><p>Comment</p></td><td><p>string</p></td><td><p>Comment to the task</p></td></tr><tr><td><p>StageType</p></td><td><p>int</p></td><td><p>The type of the processing stage at which the task was formed. See <a href="/flexi-capture/api/structures/t-processing-stage-type">ProcessingStageType</a> for possible values.</p></td></tr><tr><td><p>UserId</p></td><td><p>int</p></td><td><p>The ID of the user or group to whom the task has been assigned.</p></td></tr><tr><td><p>Flags</p></td><td><p>int</p></td><td><p>A set of flags which describe the status of the task. The value of a field is a combination of the values of the flags, which include:</p><ul><li>TA\_HasAttachedDataVerificationXml = 0x200 an XML file with pre-processing data has been generated for the task</li><li>TA\_HasAttachedDocumentsXml = 0x1000 XML files with data have been generated for the task</li></ul><p><strong>Note: </strong> Only those flags are listed which are useful when working with the tasks and <a href="/flexi-capture/api/methods/methods">methods of the Web Services API</a>.</p></td></tr><tr><td><p>CreatorId</p></td><td><p>int</p></td><td><p>The ID of the user that created the task</p></td></tr><tr><td><p>BatchName</p></td><td><p>string</p></td><td><p>The name of the batch the task is associated with</p></td></tr><tr><td><p>StageExternalId</p></td><td><p>int</p></td><td><p>The ID of the processing stage in which the task is created</p></td></tr></tbody></table>
