# ActivateCategory

## Permission Scope

category

## Overview

ActivateCategory re-enables a previously deactivated UoM category, making it and its units available for new product assignments and transactions. This command supports scenarios where a temporarily suspended category needs to be restored to active use.

## Business Rules

- Target category must exist in the system
- Target category must be in Inactive status
- Activating an already active category returns success with no state change
- All units within the category remain in their current state (active or inactive)
- Products previously using this category's units are not automatically re-enabled

## Process Flow

```mermaid
flowchart TD
    A[Receive activate request] --> B{Category exists?}
    B -->|No| C[Return error: not found]
    B -->|Yes| D{Current status?}
    D -->|Active| E[Return success: already active]
    D -->|Inactive| F[Update status to Active]
    F --> G[Return activated category]
```

## External Dependencies

- None

## Error Scenarios

- **UOM_CATEGORY_NOT_FOUND**: Specified UoM category does not exist

## Test Cases

- throws when category doesn't exist
- returns category unchanged when already active
- activates inactive category
