Hangfire.WorkflowCore
A powerful integration library that combines Hangfire’s robust job scheduling capabilities with WorkflowCore’s advanced workflow orchestration engine.
💖 Support this project: If this library helps you, consider buying me a coffee to support continued development and maintenance!
Quick Links
- 🚀 Getting Started - Installation and basic setup
- 📖 Complete Guide - Comprehensive documentation
- 🧪 Examples - Sample code and use cases
- 🔧 API Reference - Detailed API documentation
- 📈 Dashboard - Workflow monitoring and visualization
- 🌐 ASP.NET Core Integration - HttpContext workflows
- ⚙️ Configuration - Advanced configuration options
- 🔄 Migration Guide - Upgrading from older versions
- ❓ FAQ - Frequently asked questions
- 📋 Changelog - Version history and updates
Features Overview
- 🚀 Seamless Integration - Bridge Hangfire’s job scheduling with WorkflowCore’s workflow orchestration
- 🌐 HttpContext Integration - Access HTTP request context in background workflows with full serialization support
- 📊 Automatic Dashboard - Real-time workflow monitoring with automatic Hangfire dashboard integration
- 📅 Flexible Scheduling - Immediate, delayed, recurring, and continuation workflows
- 🔄 Workflow Orchestration - Complex multi-step workflows with conditional logic and parallel execution
- 🛡️ Reliable Execution - Built on Hangfire’s proven reliability and persistence
- 🏗️ Clean Architecture - Well-defined abstractions and interfaces for extensibility
- 📈 Production Ready - Comprehensive error handling, logging, and monitoring support
- ⚡ Simplified Setup - One-line configuration with automatic dashboard and WorkflowCore integration
- 🎯 Clean API - Singleton pattern with intuitive extension methods
- 🧪 Test-Driven - Comprehensive test coverage (104+ tests) following TDD principles
Installation
# Install the core package
dotnet add package Hangfire.WorkflowCore
# Install ASP.NET Core integration (for HttpContext workflows + automatic dashboard)
dotnet add package Hangfire.WorkflowCore.AspNetCore
# Install dashboard (for standalone dashboard integration)
dotnet add package Hangfire.WorkflowCore.Dashboard
# Install abstractions (if building custom integrations)
dotnet add package Hangfire.WorkflowCore.Abstractions
Quick Example
// ASP.NET Core setup with automatic dashboard integration
services.AddHangfireWorkflowCoreAspNetCore(
hangfire => hangfire.UseMemoryStorage());
// Execute a workflow immediately
var jobId = BackgroundJobWorkflow.Instance
.Enqueue<VideoProcessingWorkflow, VideoData>(videoData);
// Schedule a workflow with delay
var jobId = BackgroundJobWorkflow.Instance
.ScheduleWorkflow<VideoProcessingWorkflow, VideoData>(
videoData, TimeSpan.FromMinutes(5));
License
This project is licensed under LGPL v3 to ensure compatibility with Hangfire’s licensing requirements.
External Dependencies
- Hangfire (≥1.8.14) - Job scheduling and processing
- WorkflowCore (≥3.10.0) - Workflow orchestration engine
- Microsoft.Extensions.DependencyInjection (≥8.0.0) - Dependency injection
- Microsoft.Extensions.Logging (≥8.0.0) - Logging abstractions
📖 Get started with the Getting Started Guide or explore the Complete Documentation**!