Package Exports
- fib-flow
- fib-flow/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fib-flow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-flowQuick 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: 'user@example.com',
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