# Get Work

This method is used to list the work items of a specific process in detail, according to the given date ranges.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `ProcessName` | `String` | ❌No      | Process name |
| `Id`      | `Guid?` | ❌No      | Work ID     |
| `RelatedWorkId` | `Guid?` | ❌No      | Related work ID |
| `ReportDateBegin/End` | `DateTime?` | ❌No      | Report date range |
| `WorkDateBegin/End` | `DateTime?` | ❌No      | Work date range |
| `CreatedDateBegin/End` | `DateTime?` | ❌No      | Creation date range |
| `StartDateBegin/End` | `DateTime?` | ❌No      | Start date range |
| `EndDateBegin/End` | `DateTime?` | ❌No      | End date range |
| `IncludeCompleted` | `Boolean?` | ❌No      | Include completed |
| `IncludeFailed` | `Boolean?` | ❌No      | Include failed |
| `IncludeIdle` | `Boolean?` | ❌No      | Include idle |
| `IncludeRunning` | `Boolean?` | ❌No      | Include running |
| `IncludeExpired` | `Boolean?` | ❌No      | Include expired |
| `IncludeDisabled` | `Boolean?` | ❌No      | Include disabled |
| `IncludeReported` | `Boolean` | ❌No      | Include reported |
| `DescriptionFilter` | `String` | ❌No      | Description filter |
| `StatusNoteFilter` | `String` | ❌No      | Status note filter |
| `NoteFilter` | `String` | ❌No      | Note filter |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `IsGetWorkSuccessful` | `Boolean` | Success status |
| `GetWorkMessage` | `String` | Result message |
| `GetWorkResult` | `List<`[`PAWGetWorkResult`](/doc/pawgetworkresult-nvV2UsmJT1)`>` | Work list   |
| `GetWorkRecordCount` | `Int32` | Record count |


---

### 🎯 Purpose

* Retrieve the work records of a process in bulk
* Analyze work items created in specific date ranges
* Support reporting and monitoring processes


---

### ⚙️ How It Works

* **At least one date parameter** must be entered for the method to run
* Matching work items are filtered and returned according to the given date ranges
* If only a start date is given:
  * **All work items from that date until today** are retrieved
* If a start date and an end date are given together:
  * Work items in the specified date range are listed


---

### 📥 Input Parameters

#### 🔹 Report Date Begin

The start date for filtering.


---

#### 🔹 Report Date End (Optional)

The end date for filtering.  
If left empty, data from the start date until today is retrieved.


---

#### 🔹 Other Date Fields

Filtering can be done by the following date types:

* **Work Date**
* **Created Date**
* **Start Date**
* **End Date**


---

### 📌 Report Date Logic (Important)

* The **Report Date Begin** and **Report Date End** fields work like a union of the other date fields
* Within the given date range:
  * All work items matching the Work, Created, Start and End date criteria are returned
* Even if the same work item matches more than one date criterion:
  * **It is listed only once (no duplicates)**

📍 Example:  
If a work item matches both the start date and the end date, it is returned as **a single record**, not twice.


---

### 📤 Output

* Work records of the process
* Detailed information for each work item (status, date information, input/output, etc.)


---

### ⚠️ Important Notes

* The method does not run unless at least one date filter is entered
* Wide date ranges may affect performance
* Union logic is applied to prevent duplicate records


---

### 💡 Usage Scenarios

* Daily / weekly work reports
* Error analysis in a specific date range
* Process performance measurement
* SLA and operations tracking


---

### 💡 Summary

The Get Work method retrieves the work records of processes in a date-based and detailed way, providing a powerful data source for reporting, analysis and operational monitoring.