Skip to main content

Crate oxigdal_workflow

Crate oxigdal_workflow 

Source
Expand description

§oxigdal-workflow

DAG-based workflow engine for complex geospatial processing pipelines.

This crate provides a comprehensive workflow orchestration system with:

  • DAG-based execution with automatic parallelization
  • Flexible scheduling (cron, event-driven, interval-based)
  • State persistence and recovery from failures
  • Conditional execution and branching
  • Workflow templates and versioning
  • Comprehensive monitoring and debugging tools
  • External integrations (Airflow, Prefect, Temporal)

§Example

use oxigdal_workflow::{
    WorkflowRuntime, TaskExecutor, ExecutorConfig, ExecutionContext, TaskOutput, TaskNode,
    Result,
};
use async_trait::async_trait;

#[derive(Clone)]
struct MyExecutor;

#[async_trait]
impl TaskExecutor for MyExecutor {
    async fn execute(&self, _task: &TaskNode, _ctx: &ExecutionContext) -> Result<TaskOutput> {
        Ok(TaskOutput { data: None, logs: vec![] })
    }
}

#[tokio::main]
async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
    // Create a workflow runtime with default config
    let runtime = WorkflowRuntime::new(ExecutorConfig::default(), MyExecutor);

    Ok(())
}

§Features

  • default: Enables all features
  • full: Enables all features
  • integrations: External workflow system integrations
  • server: HTTP server for workflow management

Re-exports§

pub use conditional::ConditionalBranch;
pub use conditional::ConditionalEvaluator;
pub use conditional::ExecutionDecision;
pub use conditional::Expression;
pub use dag::TaskNode;
pub use dag::WorkflowDag;
pub use engine::ExecutionContext;
pub use engine::ExecutorConfig;
pub use engine::TaskExecutor;
pub use engine::TaskOutput;
pub use engine::WorkflowDefinition;
pub use engine::WorkflowExecutor;
pub use engine::WorkflowRuntime;
pub use error::DagError;
pub use error::Result;
pub use error::WorkflowError;
pub use monitoring::ExecutionHistory;
pub use monitoring::WorkflowMetrics;
pub use scheduler::CronSchedule;
pub use scheduler::EventTrigger;
pub use scheduler::Scheduler;
pub use scheduler::SchedulerConfig;
pub use templates::WorkflowTemplate;
pub use templates::WorkflowTemplateLibrary;
pub use versioning::WorkflowVersion;
pub use versioning::WorkflowVersionManager;

Modules§

conditional
Conditional execution system for workflows.
dag
DAG (Directed Acyclic Graph) infrastructure for workflow execution.
engine
Workflow engine core components.
error
Error types for the workflow engine.
integrations
External workflow system integrations.
monitoring
Workflow monitoring and observability.
scheduler
Workflow scheduler for managing workflow executions.
templates
Workflow template system.
versioning
Workflow versioning system.