# ReactivateStorageLocation

## Overview

reactivateStorageLocation transitions a storage location from INACTIVE back to ACTIVE status. The parent warehouse must still be in ACTIVE status for the location to be reactivated.

## Business Rules

- Storage location must exist
- Storage location must be in INACTIVE status
- Parent warehouse must be in ACTIVE status

## Process Flow

```mermaid
flowchart TD
    A[Receive reactivate request] --> B{Location exists?}
    B -->|No| C[Return error: STORAGE_LOCATION_NOT_FOUND]
    B -->|Yes| D{Status is INACTIVE?}
    D -->|No| E[Return error: STORAGE_LOCATION_NOT_INACTIVE]
    D -->|Yes| F{Warehouse ACTIVE?}
    F -->|No| G[Return error: WAREHOUSE_INACTIVE]
    F -->|Yes| H[Update status to ACTIVE]
    H --> I[Return updated location]
```

## External Dependencies

- None (internal warehouse reference via [Warehouse](../models/Warehouse.md))

## Error Scenarios

- **STORAGE_LOCATION_NOT_FOUND**: Referenced storage location does not exist
- **STORAGE_LOCATION_NOT_INACTIVE**: Storage location is not in INACTIVE status
- **WAREHOUSE_INACTIVE**: Parent warehouse is not in ACTIVE status

## Test Cases

- returns error when not found
- returns error when already active
- returns error when warehouse is inactive
- reactivates inactive location
