# ReactivateCompany

## Permission Scope

company

## Overview

ReactivateCompany transitions a company from INACTIVE back to ACTIVE status, allowing new transactions to be recorded against it. This supports scenarios where a previously inactive legal entity resumes operations.

## Business Rules

- Company must exist
- Company must be in INACTIVE status
- Reactivation restores the company to ACTIVE, enabling new transactional references

## Process Flow

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

## External Dependencies

- None

## Error Scenarios

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

## Test Cases

- reactivates INACTIVE company
- throws when company does not exist
- throws when company is in DRAFT status
- throws when company is already ACTIVE
