# Working with Tasks in Sherpa Designer

On the Designer side, working with Tasks is done through the following blocks in the Orchestrator palette:

* **Add Task to Queue;**
* **Add Tasks to Queue;**
* **Get Task from Queue;**
* **Get List of Tasks from Queue;**
* **Modify Task;**
* **Delete Task from Queue;**
* **Get Task;**
* **Get Default Task.**

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-e74b3f40e26c75527f6254eed94195f3bb5acc71%2F2025-04-15_00-05-07.png?alt=media" alt=""><figcaption></figcaption></figure>

Let's take a closer look at the operation of each block.

## Add Task to Queue

When using the “**Add Task to Queue**” block, specify the following data in the block's properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-431afe376003fff1e0e15d5b22bd5ebc4789363f%2F2025-04-15_00-21-28.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Queue Name**” (mandatory field);
* “**Title\***” – the title of the Task (mandatory field);
* “**Description**” – provide a description of the Task if necessary;
* “**Parameters**” – provide a dictionary with parameters for the Task;
* “**Delay Until**” – specify the date and time until which the Task is delayed in the format: DD.MM.YYYY hours:minutes;
* “**Deadline**” – specify the date and time deadline for completing this Task in the format: DD.MM.YYYY hours:minutes. If the specified time has already passed, the Task will receive the highest priority in the Queue\
  (i.e., when the Robot retrieves the next Task from the Queue in order of priority, this Task will be retrieved before Tasks with “High” priority);
* “**Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**List of Tags**” – provide a list of Task tags separated by semicolons;
* “**Comment**” – provide a comment for the Task;
* “**Timeout**” – specify the request execution time in seconds.

As a result, you will receive the generated “**Task GUID**” and “**Task Object**” of type $TaskObject. You can work with this object in any block or expression; for this, use the hints in the [“Edit Expression”](https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/rabota-v-sherpa-designer/paneli-svoistv-i-peremennykh-i-rabota-s-nimi/panel-svoistv) window “Examples of Working with TaskObject”.

## Add Tasks to Queue

When using the “**Add Tasks to Queue**” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-ba82b999a35909301e21799a49fe3727f0992f90%2F2025-04-15_01-16-49.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Queue Name**” (mandatory field);
* “**Parameter Table**” – provide a table with parameters, for which a new Task will be created for each row;
* “**Title Prefix**” – specify the prefix for Task titles. When a non-empty prefix is set, each Task created by this block will receive a title starting with the specified prefix. If no prefix is specified, the tasks will be named sequentially, and their identification in the list may be complicated;
* “**Index of Column with Title**” – specify the index of the column with Task titles in the input table;
* “**Number of Threads**” – specify the number of threads for creating Tasks. If a value greater than 2 is specified, the Task creation process will be divided into threads.
* “**Add Date and Time**” – set the flag if you need the current date and time to be added to the name upon activation;
* “**Description**” – description of the Tasks (if necessary);
* “**Delay Until**” – specify the date and time until which the Tasks are delayed in the format: DD.MM.YYYY hours:minutes;
* “**Deadline**” – specify the date and time deadline for completing the Tasks in the format: DD.MM.YYYY hours:minutes. If the specified time has already passed, the Tasks will receive the highest priority in the Queue (i.e., when the Robot retrieves the next Task from the Queue in order of priority, these Tasks will be retrieved before Tasks with “High” priority);
* “**Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**List of Tags**” – provide a list of Task tags separated by semicolons;
* “**Parameter Type**” – select the type of Task parameters. Possible values: Hashtable (dictionary) and DataTable (data table with one row);
* “**Timeout**” – specify the request execution time in seconds.

As a result, you will receive a generated list of GUIDs of the created Tasks.

## Get Task from Queue

When using the “**Get Task from Queue**” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-3f27764b7464bb9816b156be04dcada8f5d285d5%2F2025-04-15_01-23-33.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Queue Name**” (mandatory field);
* “**Task GUID**” – specify if you need a specific Task;
* “**Task Title**” – specify the title of the Task if you need to filter Tasks by their title;
* “**Task Status**” – specify if you need to receive Tasks only with a specific status;
* “**Task Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**Offset**” – use this property if you need to get not the first Task from the queue, but the n-th one (5, 10, etc.);
* “**Filter by Tags**” – specify tags separated by semicolons if you need to filter Tasks by them. If you need a specific tag to be present in the Task, place a “+” before it; if you need to exclude Tasks with a specific tag, place a “-” before it;
* “**Created Later**” – use this property if you need only those Tasks whose CreatedAt is greater than or equal to the value of this field. The date and time should be specified in the format: DD.MM.YYYY hours:minutes;
* “**Take to Work**” – use this property if you need to get a Task from the Queue and immediately take it to work as an atomic operation. This option is useful if multiple Robots are finishing work on the previous Task simultaneously and trying to take the next Task from the Queue. The “Take to Work” flag ensures that a specific Task will be taken to work by a specific Robot. If the flag is not set, and the situation described above occurs, an error notification will appear in the Designer;
* “**Overwrite Parameter Object**” – set the flag if you need the already specified parameter object to be overwritten. This property is relevant for data tables if a reference to a row of this table is used, as the reference to the row will not be lost when enabled;
* “**Error on No Tasks**” – set the flag if you need an error to be generated if the Task is not found. Otherwise, an empty string will be returned in the “Task Object” property;
* “**Timeout**” – specify the request execution time in seconds.

As a result, you will receive the following data:

* **Task GUID;**
* **Title;**
* **Parameters;**
* **Task Object.**

## Get List of Tasks from Queue

When using the “**Get List of Tasks from Queue**” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-12d65b0d1a167e1a13519625c86814101ec13aa2%2F2025-04-15_01-29-39.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Queue Name**” (mandatory field);
* “**Task GUID**” – specify if you need a specific Task;
* “**Task Title**” – specify the title of the Task;
* “**Task Status**” – specify if you need to receive Tasks only with a specific status;
* “**Task Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**Offset**” – use this property if you need to get not the first Task from the Queue, but the n-th one (5, 10, etc.);
* “**Maximum Number**” – specify the maximum number of Tasks that should be returned. If the parameter is not specified, no more than 100 Tasks will be returned;
* “**Filter by Tags**” – specify tags separated by semicolons if you need to filter Tasks by them. If you need a specific tag to be present in the Task, place a “+” before it; if you need to exclude Tasks with a specific tag, place a “-” before it;
* “**Created Later**” – use this property if you need only those Tasks whose CreatedAt is greater than or equal to the value of this field. The date and time should be specified in the format: DD.MM.YYYY hours:minutes;
* “**Take to Work**” – use this property if you need to get a Task from the Queue and immediately take it to work as an atomic operation. It is not recommended to use this function when using the “Get List of Tasks from Queue” block;
* “**Timeout**” – specify the request execution time in seconds;
* “**Error on No Tasks**” – set the flag if you need an error to be generated if the list of Tasks is not found; otherwise, an empty list will be returned.

As a result, you will receive the following data:

* **List of Task GUIDs;**
* **List of Task Titles;**
* **List of Task Objects;**
* **Number of Tasks.**

## Modify Task

When using the “**Modify Task**” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-8f8f4e5333063e4bce1ed5c9dbce8b5ffccf1d56%2F2025-04-15_01-33-16.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Task Name**” (mandatory field);
* “**Title**” – specify the title of the Task. If the “GUID/Task Name” field specifies the name of the Task, this field should be left empty;
* “**Status**” – specify if you need to get the Task only with a specific status;
* “**Parameters**” – provide a dictionary with parameters for the Task;
* “**Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**Delay Until**” – specify the date and time until which the Task is delayed in the format: DD.MM.YYYY hours:minutes;
* “**Deadline**” – specify the date and time deadline for completing this Task in the format: DD.MM.YYYY hours:minutes. If the specified time has already passed, the Task will receive the highest priority in the Queue\
  (i.e., when the Robot retrieves the next Task from the Queue in order of priority, this Task will be retrieved before Tasks with “High” priority);
* “**List of Tags**” – provide a list of Task tags separated by semicolons;
* “**Comment**” – provide a comment for the Task;
* “**Timeout**” – specify the request execution time in seconds.

## Delete Task from Queue

When using the “Delete Task from Queue” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-127f39677fdca428dd99671d3173b3ade0ea8454%2F2025-04-15_01-36-48.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Queue Name**” (mandatory field);
* “**Task GUID**” – specify if you need a specific Task;
* “**Task Title**” – specify the title of the Task;
* “**Task Status**” – specify if you need to receive Tasks only with a specific status;
* “**Task Priority**” – specify if you need to filter Tasks by their priority upon arrival. When selecting any priority, Tasks will arrive in order from high priority to low;
* “**Filter by Tags**” – specify tags separated by semicolons if you need to filter Tasks by them. If you need a specific tag to be present in the Task, place a “+” before it; if you need to exclude Tasks with a specific tag, place a “-” before it;
* “**Timeout**” – specify the request execution time in seconds.

As a result, you will receive the GUID of the deleted Task.

## Get Task

When using the “**Get Task**” block, specify the following data in its properties panel:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-1ecce58235016fba6c90f18b6d984ad2b10b19e9%2F2025-04-15_01-41-11.png?alt=media" alt=""><figcaption></figcaption></figure>

* “**GUID/Task Name**” (mandatory field);
* “**Timeout**” – specify the request execution time in seconds.

As a result, you will receive the following data:

* **Task Object;**
* **Task GUID;**
* **Task Name;**
* **Task Parameters;**
* **Task Priority;**
* **Task Status;**
* **Number of Task Retries;**
* **Task Creation Date;**
* **Task Modification Date;**
* **Task Delayed Until;**
* **Task Deadline;**
* **Task Tags.**

## Get Default Task

The “**Get Default Task**” block retrieves the Task specified by the current work being performed by the Robot:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-8ebb87853581d451409b873ac64a40077170c5b4%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(253).png?alt=media" alt=""><figcaption></figcaption></figure>

As a result, you will receive the following data:

* **Task GUID;**
* **Title;**
* **Parameters;**
* **Task Object.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-orchestrator/rabota-v-sherpa-orchestrator/nachalo-raboty-v-sherpa-orchestrator/sozdanie-zadachi-v-orkestratore/rabota-s-zadachami-v-sherpa-designer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
