Skip to content
/ fib-flow Public

a workflow management system built on fibjs, designed for orchestrating complex task dependencies and managing distributed task execution.

License

Notifications You must be signed in to change notification settings

fibjs/fib-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fib-flow

A powerful workflow management system built on fibjs for orchestrating complex task dependencies and distributed task execution.

Key Features

  • Workflow Management: Parent-child task relationships, automatic state propagation
  • Task Types: Async tasks and cron jobs with priorities and delays
  • State Management: Comprehensive task lifecycle and state transitions
  • Reliability: Automatic retries, timeout protection, transaction safety
  • Database Support: SQLite/MySQL/PostgreSQL with flexible connection options
  • Resource Management: Load balancing and specialized worker support

Installation

fibjs --install fib-flow

Quick Start

const { TaskManager } = require('fib-flow');

// Initialize task manager (uses in-memory SQLite by default)
const taskManager = new TaskManager();
taskManager.db.setup();

// Register task handler
taskManager.use('sendEmail', async (task) => {
    const { to, subject, body } = task.payload;
    await sendEmail(to, subject, body);
    return { sent: true };
});

// Start processing
taskManager.start();

// Add a task
taskManager.async('sendEmail', {
    to: '[email protected]',
    subject: 'Hello',
    body: 'World'
});

Documentation

Core Concepts

Configuration & Setup

Reference

Example Use Cases

  • Background Processing: File processing, report generation
  • Scheduled Tasks: Data synchronization, backups
  • Complex Workflows: Multi-step data pipelines
  • Distributed Systems: Task coordination across services

For detailed examples and implementation guides, see Usage Examples.

License

MIT License

About

a workflow management system built on fibjs, designed for orchestrating complex task dependencies and managing distributed task execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published