Frank.WorkflowEngine
0.1.0
dotnet add package Frank.WorkflowEngine --version 0.1.0
NuGet\Install-Package Frank.WorkflowEngine -Version 0.1.0
<PackageReference Include="Frank.WorkflowEngine" Version="0.1.0" />
paket add Frank.WorkflowEngine --version 0.1.0
#r "nuget: Frank.WorkflowEngine, 0.1.0"
// Install Frank.WorkflowEngine as a Cake Addin #addin nuget:?package=Frank.WorkflowEngine&version=0.1.0 // Install Frank.WorkflowEngine as a Cake Tool #tool nuget:?package=Frank.WorkflowEngine&version=0.1.0
Frank.WorkflowEngine
A simple workflow engine that is built on Dependency Injection and modern .net core features like Channel<>, IHostedService, and CronJobs.
Concepts
Workflow
A workflow is a collection of steps that are executed in a sequence. The workflow is responsible for managing the execution of the steps and the data that is passed between the steps.
Binding
A binding is a way to connect the output of one step to the input of another step. The binding is responsible for passing the data between the steps and ensuring that the data is passed correctly. This is done by using Pub/Sub pattern and Channel<>, (ChannelWriter<>, ChannelReader<> as well), to pass the data between the steps.
Trigger
A trigger can be a method call, a PulseFlow message, a CronJob, or any other event that starts a workflow. The trigger is responsible for starting the workflow and passing the initial data to the first step in the workflow.
Step
A workflow step is a single unit of work that is executed as part of a workflow. The step is responsible for performing the work and passing the data to the next step in the workflow.
WorkflowEnd
An end step is a special type of step that is used to end a workflow. The end step is responsible for finalizing the workflow and passing the data to the caller. And it should update some status of the workflow in some dependency.
WorkflowContext
The workflow context is a container that holds the metadata about the workflow. It uses Dependency Injection with keyed services based on workflow id to store the data. The context is NOT responsible for managing the data that is passed between the steps in the workflow, only the metadata about the workflow and its state and execution.
Idea Sketches
Basic Workflow
graph LR
TriggerStep{Trigger} --> WorkflowStep1
WorkflowStep1 --> WorkflowStep2
WorkflowStep2 --> WorkflowStep3
WorkflowStep3 --> EndStep
EndStep -.-> Result((Result))
Complex Workflow
graph TD
TriggerStep --> WorkflowStep
WorkflowStep --> ConditionalStep
ConditionalStep --> AStep
ConditionalStep --> BStep
AStep --> JoinStep
BStep --> SplitStep
SplitStep --> JoinStep
SplitStep --> EndStep
JoinStep --> EndStep
EndStep -.->|Result?| TriggerStep
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. |
-
net8.0
- Frank.Channels.DependencyInjection (>= 1.1.0)
- Frank.CronJobs (>= 2.0.0)
- Frank.Mapping (>= 1.1.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 153 | 2/4/2024 |