# ReactivateAccount

## Permission Scope

accountManagement

## Overview

reactivateAccount transitions a GL account from INACTIVE back to ACTIVE status.

## Business Rules

- Target account must exist
- Target account must be INACTIVE

## Process Flow

```mermaid
flowchart TD
    A[Receive reactivate request] --> B{Account exists?}
    B -->|No| C[Return not found]
    B -->|Yes| F{Account inactive?}
    F -->|No| G[Return invalid transition]
    F -->|Yes| H[Set ACTIVE]
    H --> I[Return account]
```

## External Dependencies

- None

## Error Scenarios

- **ACCOUNT_NOT_FOUND**: Specified account ID does not exist
- **INVALID_STATE_TRANSITION**: Requested state transition is not allowed from the current status

## Test Cases

- returns error when account does not exist
- returns error when account is already active
- reactivates an inactive account
