# ReactivatePartner

## Permission Scope

partner

## Overview

reactivatePartner transitions a business partner from INACTIVE back to ACTIVE status, restoring the partner's ability to participate in new transactions. This supports scenarios where a previously suspended business relationship is resumed. Only partners in INACTIVE status can be reactivated.

## Business Rules

- Partner must exist in the system
- Partner must be in INACTIVE status
- After reactivation, the partner can participate in new transactions again

## Process Flow

```mermaid
flowchart TD
    A[Receive reactivate request] --> B{Partner exists?}
    B -->|No| C[Return error: not found]
    B -->|Yes| D{Status is INACTIVE?}
    D -->|No| E[Return error: invalid state transition]
    D -->|Yes| F[Update status to ACTIVE]
    F --> G[Return reactivated partner]
```

## External Dependencies

- None

## Error Scenarios

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

## Test Cases

- reactivates an INACTIVE partner
- returns error when partner not found
- returns error when partner is DRAFT
- returns error when partner is ACTIVE
