Zurück zum Ranking

danielgerlag/workflow-core

C#

Lightweight workflow engine for .NET Standard

workflowsaga-transactionssagaworkflow-enginehacktoberfest
Sterne-Wachstum
Sterne
5.9k
Forks
1.3k
Wochenwachstum
Issues
195
2k4k
Nov. 2016Jan. 2020Apr. 2023Juli 2026
README

Workflow Core

Build status

Workflow Core is a light weight embeddable workflow engine targeting .NET Standard. Think: long running processes with multiple tasks that need to track state. It supports pluggable persistence and concurrency providers to allow for multi-node clusters.

Announcements

New related project: Conductor

Conductor is a stand-alone workflow server as opposed to a library that uses Workflow Core internally. It exposes an API that allows you to store workflow definitions, track running workflows, manage events and define custom steps and scripts for usage in your workflows.

https://github.com/danielgerlag/conductor

Documentation

See Tutorial here.

Fluent API

Define your workflows with the fluent API.

public class MyWorkflow : IWorkflow
{
    public void Build(IWorkflowBuilder<MyData> builder)
    {    
        builder
           .StartWith<Task1>()
           .Then<Task2>()
           .Then<Task3>();
    }
}

JSON / YAML Workflow Definitions

Define your workflows in JSON or YAML, need to install WorkFlowCore.DSL

{
  "Id": "HelloWorld",
  "Version": 1,
  "Steps": [
    {
      "Id": "Hello",
      "StepType": "MyApp.HelloWorld, MyApp",
      "NextStepId": "Bye"
    },        
    {
      "Id": "Bye",
      "StepType": "MyApp.GoodbyeWorld, MyApp"
    }
  ]
}
Id: HelloWorld
Version: 1
Steps:
- Id: Hello
  StepType: MyApp.HelloWorld, MyApp
  NextStepId: Bye
- Id: Bye
  StepType: MyApp.GoodbyeWorld, MyApp

Sample use cases

  • New user workflow
public class MyData
{
	public string Email { get; set; }
	public string Password { get; set; }
	public string UserId { get; set; }
}

public class MyWorkflow : IWorkflow
{
    public void Build(IWorkflowBuilder<MyData> builder)
    {    
        builder
            .StartWith<CreateUser>()
                .Input(step => step.Email, data => data.Email)
                .Input(step => step.Password, data => data.Password)
                .Output(data => data.UserId, step => step.UserId)
           .Then<SendConfirmationEmail>()
               .WaitFor("confirmation", data => data.UserId)
           .Then<UpdateUser>()
               .Input(step => step.UserId, data => data.UserId);
    }
}
  • Saga Transactions
public class MyWorkflow : IWorkflow
{
    public void Build(IWorkflowBuilder<MyData> builder)
    {    
        builder
            .StartWith<CreateCustomer>()
            .Then<PushToSalesforce>()
                .OnError(WorkflowErrorHandling.Retry, TimeSpan.FromMinutes(10))
            .Then<PushToERP>()
                .OnError(WorkflowErrorHandling.Retry, TimeSpan.FromMinutes(10));
    }
}
builder
    .StartWith<LogStart>()
    .Saga(saga => saga
        .StartWith<Task1>()
            .CompensateWith<UndoTask1>()
        .Then<Task2>()
            .CompensateWith<UndoTask2>()
        .Then<Task3>()
            .CompensateWith<UndoTask3>()
    )
    .OnError(Models.WorkflowErrorHandling.Retry, TimeSpan.FromMinutes(10))
    .Then<LogEnd>();

Persistence

Since workflows are typically long running processes, they will need to be persisted to storage between steps. There are several persistence providers available as separate Nuget packages.

A search index provider can be plugged in to Workflow Core, enabling you to index your workflows and search against the data and state of them. These are also available as separate Nuget packages.

Extensions

Samples

Contributors

  • Daniel Gerlag - Initial work
  • Jackie Ja
  • Aaron Scribner
  • Roberto Paterlini
  • Conductor (Stand-alone workflow server built on Workflow Core)

Ports

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Ähnliche Repositories
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

TypeScriptnpmOtherautomationipaas
n8n.io
197.4k59.5k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.7k23.6k
apache/airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

PythonPyPIApache License 2.0airflowapache
airflow.apache.org
46.2k17.4k
xyflow/xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.

TypeScriptnpmMIT Licenseflowchartgraph
xyflow.com
37.7k2.5k
statelyai/xstate

State machines, statecharts, and actors for complex logic

TypeScriptnpmMIT Licensestate-machinestatechart
stately.ai/docs
29.9k1.4k
labring/FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.

TypeScriptnpmOthernextjsopenai
fastgpt.io
29.1k7.2k
kestra-io/kestra

Event Driven Orchestration & Scheduling Platform for Mission Critical Applications

JavaMavenApache License 2.0orchestrationdata-orchestration
go.kestra.io/home
27.4k2.8k
PrefectHQ/prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.

PythonPyPIApache License 2.0pythonworkflow
prefect.io
23.5k2.4k
activepieces/activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

TypeScriptnpmOtherworkflow-automationmcp
activepieces.com
23.4k3.9k
Skyvern-AI/skyvern

Automate browser based workflows with AI

PythonPyPIGNU Affero General Public License v3.0apiautomation
skyvern.com
22.5k2.1k
AutomaApp/automa

A browser extension for automating your browser by connecting blocks

VueOthervuechrome-extension
goautoma.com/extension
21.5k2.3k
coze-dev/coze-studio

An AI agent development platform with all-in-one visual tools, simplifying agent creation, debugging, and deployment like never before. Coze your way to AI Agent creation.

TypeScriptnpmApache License 2.0agentchatbot-framework
21.2k3.1k