Slug: document-retry Version: 1.0.0 Infer: No Event Aware: Yes

Overview

Document Retry Mechanism

This model provides an automated retry system for documents that may have failed processing. It uses scheduled events to identify documents needing retry and applies a configurable retry strategy.

How It Works

The document retry model periodically checks for documents matching specific filter criteria, tracks retry attempts using document labels, and performs reprocessing until either:

  • The document processes successfully
  • The maximum number of retry attempts is reached (at which point the document is marked with a failure status)

Core Functionality

  1. Runs on a scheduled basis
  2. Identifies documents that match the retry filter but are not already in the failed status
  3. Tracks retry attempts using incrementing numeric labels
  4. Reprocesses documents that haven’t exceeded the retry limit
  5. Marks documents as failed when they exceed the retry limit

Process Flow

Retry Count Tracking

The system tracks retry attempts using document labels with a configurable prefix followed by a number (e.g., retry-1, retry-2).

Configuration Parameters

  • document_store_ref: Reference to the document store to query
  • retry_filter: Query filter to identify documents for retry
  • failed_status_id: Status ID to assign when max retries are exceeded
  • number_of_retries: Maximum retry attempts allowed
  • label_prefix: Prefix for retry count labels
  • project: Project endpoint for status definitions
  • assistant: Assistant endpoint for document reprocessing

This model helps ensure that temporary processing failures don’t result in permanently failed documents, improving overall processing reliability.


Inference Options

The following options can be configured when using this model for inference:

NameLabelTypeDescriptionDefaultRequired
database_hostDatabase HoststringN/A-No
database_portDatabase PortintegerN/A-No
database_usernameDatabase UsernamestringN/A-No
database_passwordDatabase PasswordpasswordN/A-No
database_nameDatabase NamestringN/A-No
document_store_refDocument StoredocumentStoreN/A-No
retry_filterRetry FilterstringN/Aexists(statistics.recentExecutions.execution.status: ‘FAILED’)No
failed_status_idFailed StatusdocumentStatusN/A-No
number_of_retriesNumber of RetriesintegerN/A3No
label_prefixLabel PrefixstringN/Aretry-No
assistantAssistantassistantN/A-No

Model Details

  • Provider: Kodexa AI