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

*