# 🔎 IsItemInQueue

### 📌 Purpose

The IsItemInQueue workflow is used to check whether the relevant work record has already been created in the queue. At this stage, the record is queried in the queue by unique key, reference number or the defined business rules. The purpose is to prevent the same record from being added to the queue again and to avoid duplicate processing.

If the check finds the record in the queue, this is logged and the record is not processed again. If the record is not found, the process is directed to the next step and the queue adding or processing operations continue. This ensures data consistency, operational safety and resource efficiency within the process.

### 📥 Input

| Parameter | Description |
|-----------|-------------|
| StartTime | Start time  |
| AddWork   | Manual data loading |
| AddToProcessName | Name of the process the works will be added to |
| UniqueIncludeIdle | Include idle works in the unique control |
| UniqueIncludeCompleted | Include completed works in the unique control |
| UniqueIncludeFailed | Include failed works in the unique control |
| UniqueIncludeDisabled | Include disabled works in the unique control |
| UniqueIncludeExpired | Include expired works in the unique control |
| UniqueControlDay | Number of days the unique control covers |
| AddWorkUniqueFieldName | Unique control field |

### ⚙️ Responsibilities

* Prevents duplicate records
* Provides idempotent operation
* Reduces unnecessary processing load