AI Doc Center: sourceDocumentId equals documentId causing reconciliation failures after document deletion
Hi all,
I’m using AI Document Center (AIDC) extraction models in a process to save extracted data to the database, and I’ve run into an inconsistent behavior between two models.
Scenario
-
A user uploads a document into my application.
-
I save that document into an application folder.
-
I send the document to an AIDC extraction model.
-
After extraction, I delete the uploaded document from my application (using standard document deletion so it’s removed from Appian).
-
Observed behavior
For Extraction Model A, the Extraction Instance record has:
-
sourceDocumentId = 46852 -
documentId = 46856
I delete the document my app knows about (46852). I can still open the Extraction Instance and reconcile without errors, which suggests AIDC is using documentId (46856), not sourceDocumentId.
For Extraction Model B, the Extraction Instance record has:
-
sourceDocumentId = 46908 -
documentId = 46908(same value)
When I delete the document from my application (46908), I can no longer open the Extraction Instance. I get an expression error indicating the document is not available or has been deleted. This matches the general behavior that if a referenced document is deleted, any process or interface that tries to load it will fail.
Questions
-
What is the intended meaning and usage of
sourceDocumentIdvsdocumentIdon the AIA Extraction Instance record? -
Under what conditions would
sourceDocumentIdanddocumentIdbe different (Model A) vs the same (Model B)? -
Is there any supported way to ensure that the document used by AIDC for reconciliation is a different document ID than the one my application deletes (like in Model A), so that deleting my “application copy” doesn’t break reconciliation?
-
Is the equality of
sourceDocumentIdanddocumentIdfor Model B expected behavior, a configuration issue, or a bug? -
Given that the public docs don’t describe these fields, what is the recommended pattern for:
-
Safely deleting or cleaning up documents used in extraction, and
-
Avoiding reconciliation failures when documents are removed from the application?
-
