From c3d207b74262ea7457f929ecefd8575d66fc71d1 Mon Sep 17 00:00:00 2001 From: Marcus van Elst Date: Sat, 4 Apr 2026 10:43:31 +0200 Subject: [PATCH] Nachbearbeitung: M4DocumentProcessor fachlich neutral umbenannt --- ...ava => DocumentProcessingCoordinator.java} | 178 +++++++++--------- .../DefaultBatchRunProcessingUseCase.java | 56 +++--- ...=> DocumentProcessingCoordinatorTest.java} | 12 +- .../BatchRunProcessingUseCaseTest.java | 106 +++++------ .../umbenenner/bootstrap/BootstrapRunner.java | 6 +- 5 files changed, 179 insertions(+), 179 deletions(-) rename pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/{M4DocumentProcessor.java => DocumentProcessingCoordinator.java} (82%) rename pdf-umbenenner-application/src/test/java/de/gecheckt/pdf/umbenenner/application/service/{M4DocumentProcessorTest.java => DocumentProcessingCoordinatorTest.java} (98%) diff --git a/pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/M4DocumentProcessor.java b/pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/DocumentProcessingCoordinator.java similarity index 82% rename from pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/M4DocumentProcessor.java rename to pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/DocumentProcessingCoordinator.java index 5de5e73..3826ffa 100644 --- a/pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/M4DocumentProcessor.java +++ b/pdf-umbenenner-application/src/main/java/de/gecheckt/pdf/umbenenner/application/service/DocumentProcessingCoordinator.java @@ -29,30 +29,30 @@ import java.time.Instant; import java.util.Objects; /** - * Application-level service that implements the M4 per-document processing logic. + * Application-level service that implements the per-document processing logic. *

- * This service is the single authoritative place for the M4 decision rules: + * This service is the single authoritative place for the decision rules: * idempotency checks, status/counter mapping, and consistent two-level persistence. - * It is intentionally tightly scoped to AP-006 and contains no M5+ logic. + * It is intentionally tightly scoped to AP-006 and contains no further logic. * - *

M4 processing order per candidate

+ *

Processing order per candidate

*
    *
  1. Load the document master record by fingerprint.
  2. *
  3. If the overall status is {@link ProcessingStatus#SUCCESS} → create and persist * a skip attempt with {@link ProcessingStatus#SKIPPED_ALREADY_PROCESSED}.
  4. *
  5. If the overall status is {@link ProcessingStatus#FAILED_FINAL} → create and persist * a skip attempt with {@link ProcessingStatus#SKIPPED_FINAL_FAILURE}.
  6. - *
  7. Otherwise execute the M3 flow (already done by the caller) and map the result - * into M4 status, counters and retryable flag.
  8. + *
  9. Otherwise execute the flow (already done by the caller) and map the result + * into status, counters and retryable flag.
  10. *
  11. Persist exactly one historised processing attempt for the identified document.
  12. *
  13. Persist the updated document master record.
  14. *
* - *

M4 minimal rules

+ *

Minimal rules

*