Kodexa Rules Engine
A model with utilities to support rules engines
Slug: rules-engine-model
Version: 1.0.0
Overview
Kodexa Rules Engine Model
The Rules Engine model provides a powerful framework for implementing conditional logic in your document processing pipelines. Based on the REET (Rule Evaluation Execution Trigger) algorithm, this model allows you to define rules with conditions and actions that execute when those conditions are met.
How It Works
- The engine evaluates a set of prioritized rules against document data
- When a rule’s conditions evaluate to true, the associated actions are triggered
- Actions can modify document metadata, create tasks, or interact with other systems
- Rules are evaluated in order of priority, allowing for complex decision trees
Core Components
Rules
Rules contain conditions and actions. Each rule has:
- A name and description
- A priority value (lower numbers execute first)
- A list of conditions that must all be true for the rule to trigger
- A list of actions to execute when the rule triggers
Conditions
Conditions are functions that evaluate some aspect of your data and return true or false.
Actions
Actions are executed when a rule’s conditions are met. The model includes several built-in actions:
- set_value: Sets a property value in the document context
- run_prompt: Executes an LLM prompt against document content
- reject_document: Marks a document as rejected with a reason
- send_to_vs: Forwards document data to Visual Studio Kodexa
Process Flow
Example Rule Structure
Advanced Usage
The Rules Engine can be extended with custom conditions and actions for complex business logic:
- Integration with LLM models via the
run_prompt
action - Custom validation rules for specific document types
- Workflow routing based on document content
- Quality control gates with automatic rejection of non-compliant documents
By combining different rules with appropriate priorities, you can create sophisticated decision trees that handle complex document processing requirements.
Model Details
- Provider: Kodexa