FlowForge 1.0.0
dotnet add package FlowForge --version 1.0.0
NuGet\Install-Package FlowForge -Version 1.0.0
<PackageReference Include="FlowForge" Version="1.0.0" />
paket add FlowForge --version 1.0.0
#r "nuget: FlowForge, 1.0.0"
// Install FlowForge as a Cake Addin #addin nuget:?package=FlowForge&version=1.0.0 // Install FlowForge as a Cake Tool #tool nuget:?package=FlowForge&version=1.0.0
FlowForge
FlowForge is a dynamic and extensible workflow engine designed to simplify and automate complex processes. Built with flexibility and scalability in mind, FlowForge allows developers to define, manage, and execute workflows seamlessly. Whether you're orchestrating business logic, automating processes, or handling asynchronous events, FlowForge provides the tools you need to forge workflows into efficient, reliable systems.
Features
Dynamic Workflow Definitions
Define workflows using JSON, YAML, or a fluent API builder, giving you flexibility in how you model your processes.Parallel and Sequential Execution
Supports sequential steps, parallel execution, and synchronization of tasks.Event-Driven Architecture
Trigger workflows and transitions based on custom events, ensuring responsiveness to external inputs.OnEnter and OnExit Actions
Execute customizable actions on entering or exiting a state, including:- Webhook calls
- Timer-based delays
- Custom behaviors
Pluggable Components
Integrates easily with your infrastructure:- Databases: Supports PostgreSQL, MongoDB, SQL Server, etc.
- Queues: RabbitMQ, Kafka, or custom implementations.
Built-in Scheduler
Add delays or schedule transitions at specific times.State Management
Track workflow progress and transitions with detailed event logs for auditing and debugging.Assignment Rules
Assign users or groups to states, ensuring only authorized actors can trigger transitions.Extensible Action System
Register custom actions for bespoke behavior, allowing seamless integration with your existing systems.Visualization Tools
Generate Mermaid diagrams directly from workflow definitions for easy visualization and debugging.
Installation
Install the core FlowForge package via NuGet:
dotnet add package FlowForge
To integrate specific modules (e.g. PostgreSQL or RabbitMQ):
dotnet add package FlowForge.PostgreSQL
dotnet add package FlowForge.RabbitMQ
Getting Started
1. Define a Workflow
You can define workflows using JSON or the provided fluent builder.
Using the Fluent Builder:
var workflow = new WorkflowDefinitionBuilder("Sample Workflow")
.Start(s => s
.OnEnter(new WebhookAction("http://example.com/start"))
)
.Delay(TimeSpan.FromMinutes(5))
.ActionableStep("Approval", s => s
.AssignGroup("managers")
.OnEnter(new WebhookAction("http://example.com/approval"))
.Transition("event == \"Approved\"")
.Transition("event == \"Declined\"", "Start")
)
.End();
2. Register the Workflow
await workflowEngine.RegisterWorkflowAsync(workflow);
3. Start a Workflow instance
var instanceId = await workflowEngine.StartWorkflowAsync(workflowId, new Dictionary<string, object>
{
{ "initialData", "example" }
});
4. Trigger Events
await workflowEngine.TriggerEventAsync(instanceId, "Approved", new Dictionary<string, object>
{
{ "reviewer", "admin" }
});
5. Visualize the Workflow
Use the Mermaid Diagram Generator to create visual representations of your workflows:
var diagram = workflowEngine.GenerateMermaidDiagram(workflowDefinition);
Console.WriteLine(diagram);
Modules
FlowForge is modula, allowing you to select the components that best fit your infrastructure:
Database Modules
- PostgreSQL:
FlowForge.PostgreSQL
- MongoDB:
FlowForge.MongoDB
(coming soon)
Event Queue Modules
- RabbitMQ:
FlowForge.RabbitMQ
- Kafka:
FlowForge.Kafka
(coming soon)
Example Configuration
In your Program.cs
:
builder.Services.AddWorkflowEngine(options =>
{
options.EnableDetailedLogging = true;
})
.UsePostgresql("Host=localhost;Database=workflow;Username=postgres;Password=password")
.UseRabbitMQ("localhost", "workflow-queue");
Why Choose FlowForge?
- Flexibility: Support for a variety of databases, event queues, and custom actions.
- Extensibility: Easily add new modules or integrations.
- User-Friendly: Fluent APIs, YAML support, and visualization tools make workflows easy to define and manage.
- Performance: Designed to handle high-throughput and complex workflows with ease.
Contributing
We welcome contributions to FlowForge! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
License
FlowForge is licensed under the MIT License.
Feedback and Support
If you encounter issues or have feature requests, please open an issue in the Github repository. For questions or feedback, feel free to contact me directly at justinlovelessx@gmail.com
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Esprima (>= 3.0.5)
- Jint (>= 4.1.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- StronglyTypedId (>= 0.2.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on FlowForge:
Package | Downloads |
---|---|
FlowForge.Mermaid
Enable generating mermaid diagrams from FlowForge workflows |
|
FlowForge.Postgresql
Package Description |
|
FlowForge.RabbitMQ
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 76 | 1/1/2025 |
0.1.0-alpha-gbbe6a38e20 | 69 | 1/1/2025 |
0.1.0-alpha-ga7e146e2d3 | 70 | 1/1/2025 |
0.1.0-alpha-g8585bcceea | 71 | 1/1/2025 |
0.1.0-alpha-g24c32358cc | 70 | 1/1/2025 |
0.1.0-alpha-g207bb190a1 | 73 | 1/1/2025 |
0.0.1 | 90 | 1/1/2025 |
0.0.1-gf09ab8942f | 85 | 1/1/2025 |
0.0.1-gdce4eca7c3 | 79 | 1/1/2025 |
0.0.1-g9647f888ee | 72 | 1/1/2025 |