# Guide d'utilisation
## Prérequis
- Rust stable
- Cargo
- Optionnel : SQLite/MySQL/PostgreSQL
## 1) Compiler et tester
```bash
cargo check --all-features --examples
cargo test --all-features
```
## 2) Lancer l'exemple Axum
```bash
cargo run --example leave_request
```
Endpoint : `http://127.0.0.1:3000`
## 3) Créer un workflow de congé
```bash
curl -X POST http://127.0.0.1:3000/workflows \
-H "Content-Type: application/json" \
-d '{"workflow_type":"leave_request","data":{"employee_id":"emp-001","manager_id":"mgr-001","hr_id":"hr-001","start_date":"2026-03-01","end_date":"2026-03-03","reason":"congé","locale":"fr"}}'
```
## 4) Interroger workflow et tâches
```bash
curl http://127.0.0.1:3000/workflows/{workflow_id}
curl http://127.0.0.1:3000/workflows/{workflow_id}/tasks
```
## 5) Terminer une tâche
```bash
curl -X POST http://127.0.0.1:3000/tasks/{task_id}/complete \
-H "Content-Type: application/json" \
-d '{"data": {"approved": true, "locale": "fr"}}'
```
## Licence
MIT