Make E-Document import processing v2 (drafts) the default; deprecate v1 inbound import#9649
Make E-Document import processing v2 (drafts) the default; deprecate v1 inbound import#9649Groenbech96 wants to merge 6 commits into
Conversation
…, UI, permissions) behind CLEAN29 Prepare-then-obsolete step (Task 1a-1d): wrap v1-only code in #if not CLEAN29 and #pragma AL0432 ahead of deprecating the v1 import API. No obsoletions yet; behavior-preserving in the pending phase. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…emo for v1 deprecation Prepare-then-obsolete step (Task 1e-1f): #pragma AL0432 around the two inbound interface method implementations in all 13 implementers; guard v1-only tests, keep+guard compensating v2 writes, phase-guard LibraryEDocument v1 hardcodes, drop the now-redundant demo-data v2 write. No obsoletions; pending phase unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… pipeline
Obsolete the two inbound "E-Document" interface methods and the
"Version 1.0" import-process enum value ('29.0'); two-stage obsolete the
v1 service table fields (7, 8-15, 16-17, 31) under CLEANSCHEMA32; add
InitValue = "Version 2.0" so new services default to the v2 draft
pipeline. Guard the v1 journal-line codeunit and complete pending-phase
AL0432 suppression on retained v1 reads. Pending phase behavior
unchanged except the new default.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s to v1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
| EDocService."Document Format" := "E-Document Format"::Mock; | ||
| EDocService."Service Integration" := Integration; | ||
| #if not CLEAN29 | ||
| EDocService."Import Process" := Enum::"E-Document Import Process"::"Version 1.0"; |
There was a problem hiding this comment.
New logic is being added inside members already marked [Obsolete] (since BC 26.0) and inside new #if not CLEAN29 branches in the E-Document test service factory helpers. This ties current behavior to code paths that are themselves scheduled for removal and creates an avoidable extra migration burden when CLEAN29/CLEAN26 is enabled. The same pattern recurs at multiple overloads in this file (e.g. the already-[Obsolete('...','26.0')] CreateService(Integration: Enum "E-Document Integration"), CreateTestReceiveServiceForEDoc(Integration: Enum "E-Document Integration"), and CreateGetBasicInfoErrorReceiveServiceForEDoc(Integration: Enum "E-Document Integration") overloads), all of which gain a new #if not CLEAN29 ... EDocService."Import Process" := ..."Version 1.0" ... #endif statement inside an already-obsolete member. Move the v1 pinning to a supported, non-obsolete helper instead of extending obsolete/transient code paths.
Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4
|
Superseded by #9654. Scoped down to just step 1: default new services to import v2 (InitValue) and expose the version selector on the service card, with no v1 deprecation/obsoletion — the local format apps aren't migrated off v1 yet. This PR was too broad (49 files, obsoletes across many apps); #9654 is 7 files, +26/-4. |
What & why
Makes Import Processing v2 (the multi-stage draft pipeline) the default for the E-Document framework and begins the deprecation of the legacy v1 single-shot import. The setup page and new services now flow through v2; v1 remains available but is marked obsolete-pending for removal in
29.0.Concretely, this branch:
"E-Document Service"."Import Process"field 31 now hasInitValue = "Version 2.0", so freshly initialized services use the draft pipeline. The setup/service card surfaces the v2 groups by default and hides v1-only inbound configuration.interface "E-Document"—GetBasicInfoFromReceivedDocumentandGetCompleteInfoFromReceivedDocument— with[Obsolete('… v2 draft pipeline (IStructuredFormatReader / IProcessStructuredData) …', '29.0')]. The outboundCheck/Create/CreateBatchmethods are untouched."Version 1.0"value of enum"E-Document Import Process"(#if not CLEAN29).#if not CLEANSCHEMA32, Pending'29.0'/ Removed'32.0').#if not CLEAN29and updates the framework docs.All obsoletions are partial and phase-gated, so the pending phase compiles and behaves exactly as before while signalling the migration path.
Linked work
Fixes #
How I validated this
What I tested and the outcome
src/rulesets/base.ruleset.json) setsAL0432 = None, so obsolete-pending references are compile-clean by policy.NewServiceDefaultsToImportProcessV2(assertsInit()yieldsImport Process = Version 2.0). The v1-oriented test factories inLibrary - E-Documentwere pinned toVersion 1.0(guarded#if not CLEAN29) so theInitValuechange does not silently flip the existing receive/flow suites onto the v2 path.1de9b56a31and re-confirmed resolved. Preprocessor/pragma balance verified on every changed.alfile.Risk & compatibility
interface "E-Document"methods, the"Version 1.0"import-process enum value, and the listed v1-only service fields are obsolete-pending as of29.0. Extensions implementing the inbound v1 methods should migrate toIStructuredFormatReader/IProcessStructuredData. Table fields follow the two-stage schema removal (Removed in32.0).Import Processthey already have — no data migration is performed.mainthat describe a v1 "deprecation notification" should be reconciled — the notification was intentionally dropped from the UI in favor of the field-level obsoletion.