Files
DigitalData.TaskFlow/src/core/DigitalData.TaskFlow.Domain
TekH 70e82567d8 Refactor workflows and improve API responses
- Added `BackToPerMethodId` constant and updated validation rules in `CloseWorkflowCommandValidator`.
- Refactored `GetWorkflowsQueryHandler` for simpler `hasListingData` logic.
- Replaced strongly-typed properties with `JsonElement` in `ContractsSourceBlock` and `FerdinandSourceBlock`.
- Updated `WorkflowListingReadModel` to use smaller data types for efficiency.
- Refactored `WorkflowRepository` to use JSON-based data retrieval and parsing.
- Introduced `MetaOnlyResponse` and `WorkflowsResponse` for consistent API responses.
- Updated `DocumentsController` and `WorkflowsController` to use new response types.
- Added `ApiKeyAuthMiddleware` for API key validation and integrated it into the middleware pipeline.
- Refactored `ExceptionHandlingMiddleware` to use `MetaOnlyResponse` for error handling.
- Performed general cleanup and modernization for improved readability and maintainability.
2026-10-10 20:47:31 +02:00
..

DigitalData.TaskFlow.Domain

Dieses Projekt bildet den fachlichen Kern von DigitalData.TaskFlow.

Zweck

Die Domain-Schicht enthaelt ausschließlich fachliche Modelle und Begriffe. Hier wird beschrieben, was das System fachlich darstellt, nicht wie Daten gelesen/geschrieben werden.

Aktueller Inhalt

  • Common/
    • ApiEnvelope<T>: Standard-Response-Huelle mit Meta und Data.
    • MetaEntry: Einzelner Meta-Eintrag (Code, Message).
  • Enums/
    • MetaCode: Fachliche Status-Codes (z. B. Ok, NoAccess, AlreadyClosed).
  • Workflows/
    • Modelle fuer den Endpoint GET /workflows/{wisagid}.
    • Enthalten Quellblock-Struktur (SourceBlock, FerdinandSourceBlock, ContractsSourceBlock) und Untermodelle (ProfileItem, WorkflowListingItem, ApprovalItem, DocumentReferenceItem, ClosingMethodItem, RejectionReasonItem).
  • Closing/
    • Modelle fuer den Endpoint POST /workflows/{wisagid}/{source}/{processid}/closing.
    • CloseWorkflowDecision (Eingabe), CloseWorkflowResult (Ergebnis).
  • Documents/
    • DocumentBinaryResult fuer den Endpoint GET /documents/{id}.

Architektur-Regeln

  • Keine EF-Core-, HTTP-, SQL- oder Infrastruktur-Abhaengigkeiten.
  • Keine Controller- oder Middleware-Logik.
  • Modelle bleiben in PascalCase; technische DB-Namensabweichungen werden spaeter in Infrastructure gemappt.

Warum diese Schicht wichtig ist

Die Domain stellt eine stabile, technologieunabhaengige Sprache bereit. Dadurch koennen API, Application und Infrastructure getrennt entwickelt werden, ohne den fachlichen Vertrag zu verlieren.