# ReactivateWorkRegime

## Permission Scope

`workRegime`

## Overview

ReactivateWorkRegime returns an INACTIVE WorkRegime catalog entry to ACTIVE so it is selectable for new employments again.

## Business Rules

- The entry is identified by `id` and must currently be INACTIVE
- Reactivation flips `status` INACTIVE → ACTIVE
- Reactivating an entry that is already ACTIVE is rejected as an invalid status transition

## Process Flow

```mermaid
flowchart TD
    A[Reactivate WorkRegime by id] --> B{WorkRegime exists?}
    B -- No --> X[Reject: WORK_REGIME_NOT_FOUND]
    B -- Yes --> C{status is INACTIVE?}
    C -- No --> Y[Reject: INVALID_WORK_REGIME_STATUS]
    C -- Yes --> D[Set status = ACTIVE]
    D --> E[Selectable for new employments again]
```

## External Dependencies

- [workforce::WorkRegime](../model/WorkRegime.md) model — the entity this command mutates

## Error Scenarios

- **WORK_REGIME_NOT_FOUND**: no WorkRegime exists for the given id
- **INVALID_WORK_REGIME_STATUS**: the work regime is not in a status that allows this transition

## Test Cases

- reactivating an INACTIVE entry sets it ACTIVE
- reactivating an already-ACTIVE entry is rejected
- reactivating a non-existent work regime is rejected
