Document Timeout
A model that runs on scheduled events to determine if a document has timed out.
Slug: document-timeout
Version: 1.0.0
Infer: No
Event Aware: Yes
Overview
Document Timeout Model
The Document Timeout model provides automated monitoring and handling of stalled documents in processing pipelines. It runs on a scheduled basis to identify documents stuck in processing states for too long and updates their status to indicate a timeout condition.
How It Works
- The model runs on a scheduled basis (typically set up as a recurring event)
- It queries the specified document store using a configurable timeout filter
- The filter identifies documents that may be stuck in processing states
- For each identified document, it updates the status to a designated timeout status
- This allows for appropriate handling of documents that may have stalled in processing
Options Configuration
Option | Description |
---|---|
document_store_ref | The document store to scan for potential timeouts |
timeout_filter | A query expression that identifies documents that may have timed out |
timeout_status_id | The status to apply to documents that are determined to have timed out |
Timeout Filter Syntax
The timeout filter uses Kodexa’s query language to identify documents. The default filter looks for:
- Documents with executions in PENDING, RUNNING, or FAILED states
- Documents with execution events in PENDING, RUNNING, or FAILED states
- Documents modified within the last 24 hours
You can customize this filter to match your specific timeout criteria, such as:
- Longer or shorter timeouts
- Different status combinations
- Additional conditions based on document metadata
- Specific document types or processing stages
Process Flow
Use Cases
The Document Timeout model is particularly useful for:
- Workflow Monitoring: Identifying stuck documents in automated workflows
- Error Recovery: Handling documents that have stalled due to processing errors
- SLA Compliance: Ensuring documents are processed within defined time periods
- Queue Management: Preventing document backlogs in processing queues
- Pipeline Monitoring: Ensuring smooth operation of document processing pipelines
Example Configuration
To set up a basic timeout detection that flags documents stuck in processing for more than 12 hours:
Integration Considerations
- The model should be configured to run on a schedule that makes sense for your processing timelines
- The timeout status should be defined in your project’s status configuration
- You may want to create different timeout handlers for different document types or processing stages
- Consider creating notifications or alerts when documents timeout
- Timeout handling can be complemented with retry mechanisms using the Document Retry model
Inference Options
The following options can be configured when using this model for inference:
Name | Label | Type | Description | Default | Required |
---|---|---|---|---|---|
document_store_ref | Document Store | documentStore | N/A | - | No |
timeout_filter | Timeout Filter | string | N/A | exists(executions.status in [‘PENDING’,‘RUNNING’, ‘FAILED’]) and exists(executions.events.status in [‘PENDING’, ‘RUNNING’,‘FAILED’]) and modified > dateMath(‘now - 24 hours’) | No |
timeout_status_id | Timeout Status | documentStatus | N/A | - | No |
Model Details
- Provider: Kodexa AI