Skip to main content
The Task API enables developers to create custom processing modules that integrate into IPED’s processing pipeline.

AbstractTask Class

Package: iped.engine.task
Source: iped-engine/src/main/java/iped/engine/task/AbstractTask.java
The AbstractTask class is the base class for all processing tasks in IPED. Each worker thread maintains its own instances of tasks.

Creating a Custom Task

Extend AbstractTask and implement the required abstract methods:

Abstract Methods

getConfigurables()

List<Configurable<?>>
Returns a list of Configurable objects containing task-specific configuration options. These are loaded at startup and passed to init(). Can be used by UIs to query task options.

init()

void
Performs task initialization. Called once per worker thread at startup. Use this to:
  • Load task configurations
  • Initialize models or resources
  • Validate dependencies
  • Set up per-thread state

process()

void
Processes a single evidence item. This is the main task logic. Called for each item in the case.

finish()

void
Performs cleanup when task processing completes. Called once per worker thread. Use this to:
  • Release resources
  • Close files or connections
  • Save final statistics

Protected Fields

Tasks have access to several protected fields:
Worker
The worker thread executing this task
Statistics
Statistics object that can be updated by the task
File
Processing output directory where tasks can create subdirectories for results
CaseData
Represents the current case. Use caseData.objectMap to share objects between task instances.

Example: Accessing Protected Fields

Task Configuration

Optional Methods

boolean
Returns whether the task is enabled. Default is true. Override to implement enable/disable logic.
boolean
Returns whether the task should process ignored items (items with hashDb:status=known). Default is false.
boolean
Returns whether the task should process special queue-end marker items. Default is false.

Creating Subitems

Tasks can create subitems when extracting embedded content:

Checking Dependencies

Ensure required tasks are enabled:

Sharing Data Between Task Instances

Use the case object map to share data:

Complete Example: Hash Lookup Task

Complete Example: File Classifier Task

Registering Tasks

To use your custom task, register it in IPED’s configuration:
  1. Compile your task and package it as a JAR
  2. Place the JAR in IPED’s lib or plugins directory
  3. Add the task to conf/TaskInstaller.xml:

Task Lifecycle

Best Practices

Thread-Safe Shared State: When sharing data between task instances using caseData.objectMap, use thread-safe collections like ConcurrentHashMap.
Resource Management: Always release resources in finish(). Each worker thread has its own task instances.
Performance: Skip unnecessary processing early in the process() method. Check file type, size, or other properties before expensive operations.
Dependencies: Use checkDependency() to ensure required tasks are enabled and run before yours.
Exceptions: Let exceptions propagate unless you have a specific reason to handle them. IPED’s framework handles task failures gracefully.

Task Execution Order

Tasks execute in the order defined in TaskInstaller.xml. Consider dependencies when ordering:
  1. SignatureTask - Detect file types
  2. HashTask - Compute hashes
  3. ParsingTask - Extract text content
  4. Your custom tasks - Use results from previous tasks

Debugging Tasks

Enable detailed logging:

See Also