Slug: task-event-processor Version: 1.0.0 Infer: No Event Aware: Yes

Overview

Task Event Processor Model

The Task Event Processor model automates document workflow management by monitoring task events and taking configurable actions based on task status changes. It enables automated document transitions, task coordination, and status synchronization within your document processing pipelines.

How It Works

  1. The model listens for task status change events
  2. When a task status changes, it examines related tasks for the document
  3. Based on your configuration, it can:
    • Update document status when all tasks are complete
    • Cancel all other document tasks if a task is rejected
    • Enforce status transition rules and dependencies

Options Configuration

OptionDescription
document_storeThe document store containing documents to process
should_update_document_statusWhen enabled, updates document status when all related tasks are complete
document_statusThe status to set documents to when all tasks are complete
is_current_status_requiredWhen enabled, only updates documents that are in a specific status
required_current_statusThe status documents must be in to qualify for status updates
should_cancel_all_tasks_if_task_is_rejectedWhen enabled, cancels all other tasks when one is rejected
rejected_statusThe task status that indicates rejection
task_status_if_task_canceledThe status to set other tasks to when a task is rejected

Process Flow

Typical Use Cases

The Task Event Processor model is particularly useful for:

  • Automated Workflow Transitions: Move documents to the next status when all tasks are complete
  • Task Dependency Management: Automatically cancel dependent tasks when a primary task is rejected
  • Status Rule Enforcement: Ensure documents follow proper status transitions
  • Process Optimization: Reduce manual status updates and task management
  • Multi-step Approvals: Coordinate complex approval workflows with multiple tasks

Example Configurations

Document Completion Workflow

To automatically move documents to “Complete” status when all tasks are finished:

document_store: "production-documents"
should_update_document_status: true
document_status: "Complete"

Rejection Handling Workflow

To cancel all other tasks when a document is rejected in review:

document_store: "document-inbox"
should_cancel_all_tasks_if_task_is_rejected: true
rejected_status: "Rejected"
task_status_if_task_canceled: "Canceled"

Conditional Status Transition

To only update documents from “In Review” to “Approved” when all tasks are complete:

document_store: "review-documents"
should_update_document_status: true
is_current_status_required: true
required_current_status: "In Review"
document_status: "Approved"

Technical Considerations

  • The model examines all tasks related to a document before updating status
  • Status updates only happen when ALL tasks reach “DONE” status type
  • The task cancellation feature uses the task status you specify, typically “Canceled”
  • You must select existing status values from your project configuration

Inference Options

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

NameLabelTypeDescriptionDefaultRequired
should_update_document_statusIf all tasks are done, update the Kodexa document statusbooleanToggle on to update the Kodexa document status when all tasks have a status type of DONEFalseNo
is_current_status_requiredIs a specific current status also required in order to update the Kodexa document status?booleanToggle on to also require a specific current status to exist on the document in order to update the Kodexa document statusFalseNo
required_current_statusRequired current Kodexa document statusdocumentStatusThe Kodexa status to check for before updating the document status-No
document_statusNew Kodexa document statusdocumentStatusThe Kodexa status to update the document to when all tasks have a status type of DONE-No
should_cancel_all_tasks_if_task_is_rejectedUpdate the status of all other document tasks if the task is rejected?booleanToggle on to update the status of all other document tasks if the task is rejectedFalseNo
rejected_statusRejected StatustaskStatusSelect the rejected status to test for-No
task_status_if_task_canceledStatus to set the other document tasks to if the task is rejectedtaskStatusThe status to set the other document tasks to if the task is rejected-No
document_storeDocument StoredocumentStoreThe document store to update the document status in-Yes

Model Details

  • Provider: Kodexa AI