rust-viewflow 0.1.0

Rust workflow library inspired by Viewflow, compatible with Axum and Actix-web
Documentation
# Nutzungsdokumentation

## Voraussetzungen

- Rust Stable Toolchain
- Cargo
- Optional: SQLite/MySQL/PostgreSQL

## 1) Bauen und testen

```bash
cargo check --all-features --examples
cargo test --all-features
```

## 2) Beispieldienst starten (Axum)

```bash
cargo run --example leave_request
```

Endpoint: `http://127.0.0.1:3000`

## 3) Urlaubsworkflow erstellen

```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":"urlaub","locale":"de"}}'
```

## 4) Workflow und Tasks abfragen

```bash
curl http://127.0.0.1:3000/workflows/{workflow_id}
curl http://127.0.0.1:3000/workflows/{workflow_id}/tasks
```

## 5) Task abschließen

```bash
curl -X POST http://127.0.0.1:3000/tasks/{task_id}/complete \
  -H "Content-Type: application/json" \
  -d '{"data": {"approved": true, "locale": "de"}}'
```

## 6) Actix-Beispiel

```bash
cargo run --example leave_request_actix --features actix
```

## Lizenz

MIT