# ReactivateSite

## Permission Scope

organizationUnit

## Overview

ReactivateSite transitions a site from INACTIVE back to ACTIVE status, making it available again for inventory and shipping operations. This supports facility reopening scenarios such as seasonal demand.

## Business Rules

- Site must exist
- Site must be in INACTIVE status

## Process Flow

```mermaid
flowchart TD
    A[Receive reactivate request] --> B{Site exists?}
    B -->|No| C[Return error: SITE_NOT_FOUND]
    B -->|Yes| D{Site in INACTIVE?}
    D -->|No| E[Return error: INVALID_STATE]
    D -->|Yes| F[Set status: ACTIVE]
    F --> G[Return reactivated site]
```

## External Dependencies

- None

## Error Scenarios

- **SITE_NOT_FOUND**: Specified site ID does not exist
- **INVALID_STATE**: Target entity is not in a valid status for this operation

## Test Cases

- reactivates INACTIVE site
- throws when site does not exist
- throws when site is already ACTIVE
