# Find

### Overview

The **Find Storage Component** searches for values in a specified storage location based on a provided pattern.

### Usage

This component is used to retrieve stored values that match a specific search pattern, allowing structured querying of stored data.

#### Input Ports

| Port | Description                                                   |
| ---- | ------------------------------------------------------------- |
| `in` | Receives the search pattern to find matching storage entries. |

#### Output Ports

| Port       | Description                                              |
| ---------- | -------------------------------------------------------- |
| `out`      | Emits a list of found items matching the search pattern. |
| `notFound` | Emits the search pattern if no matching items are found. |

#### Properties

| Property  | Type     | Description                                                     |
| --------- | -------- | --------------------------------------------------------------- |
| `storeId` | `string` | The ID of the storage space where the search will be performed. |

#### Processing Logic

1. **Receives Search Pattern**: Accepts a pattern to match stored entries.
2. **Searches Storage**: Queries the specified `storeId` for matching values.
3. **Returns Results**:
   * If matches are found, outputs the list of matching items to `out`.
   * If no matches are found, emits the search pattern to `notFound`.

#### Output Data Schema

| Property    | Type     | Description                                   |
| ----------- | -------- | --------------------------------------------- |
| `key`       | `string` | The key of the found item.                    |
| `value`     | `string` | The value of the found item.                  |
| `createdAt` | `string` | The timestamp when the item was created.      |
| `updatedAt` | `string` | The timestamp when the item was last updated. |

### Notes

* **Pattern-Based Search**: Uses regular expressions to match stored values.
* **Efficient Querying**: Enables structured searches within large storage datasets.
* **Supports Workflow Automation**: Useful for dynamically retrieving stored data based on input patterns.

This component is essential for workflows that require structured searches within stored data for automation, validation, and reporting purposes.
