You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Micro Workflow is a very fast, small, embedable and distributed workflow system primarily for .Net developers.
@@ -14,22 +13,27 @@ The code base is so small every one can read and understand the inner workings i
14
13
15
14
# 1. Why use Micro Workflow
16
15
17
-
You should consider using Micro Workflow due to one or more of the following reason
16
+
You should consider using Micro Workflow for one or more of the following reasons.
17
+
* When you have a need for a queue,
18
+
* scheduling and re-scheduling of code to be executed
19
+
* distributing load across multiple servers
20
+
* or a business process that needs to be robust (have it being broken up into steps and its progress persisted).
18
21
19
-
when you have a need for a queue, scheduling of code to execute, or a business process that needs to be robus. We provide many examples in ["integration patterns"](https://github.com/kbilsted/MicroWorkflow.net/tree/feature/doc?tab=readme-ov-file#5-integration-patterns)
22
+
We provide many examples in ["integration patterns"](https://github.com/kbilsted/MicroWorkflow.net/tree/feature/doc?tab=readme-ov-file#5-integration-patterns) on how to get started.
20
23
24
+
Design philosophy
21
25
22
26
**Simplicity**
23
27
* We model only the steps in a workflow, *not* the transitions between them
24
-
* This greatly *simplify* the model, the versioning of flows and steps
25
-
*enable you to use reusable code blocks for determining a transition
26
-
* It is *easy* to embed it directly into your solutions to improve resiliance or use as a stand-alone workflow
28
+
* This greatly *simplifies* the model, especially when dealing with change and versioning
29
+
*It enables you to use reusable code blocks for determining a transition
30
+
* It is *easy* to embed micro workflow directly into your solutions to improve resiliance or use as a stand-alone workflow
27
31
28
32
**We use C# all the way**
29
-
* We don't want to invent a new language - we love C#!
33
+
* We don't want to invent a new language for the workflow - we love C#!
30
34
* Workflow code is *readable*, *debugable*, and *testable* - like the rest of your code base.
31
35
* You can use existing best practices for logging, IOC containers etc. of your choice
32
-
*Since Workflow code is just C# it is *easy to commit and merge*use your existing *branching strategies*
36
+
* Workflow code is just C# so it is *easy to commit and merge*using your existing *branching strategies*
33
37
* You *do not* need a special graphical editor for specifying flows
34
38
35
39
**The datamodel is simple - just three DB tables**
@@ -38,15 +42,15 @@ when you have a need for a queue, scheduling of code to execute, or a business p
38
42
39
43
**Distributed mindset**
40
44
* Supports *Fail-over setup* To improve up-time applications/integrations are often running on multiple servers at the same time. This is a common scenario is supported with no special setup.
41
-
* Supports incremental deployments across more instances. When deploying multiple instances, the roll-out is typical gradual. Hence we support that steps may be added that is only known to a sub-set of the running workflows.
45
+
* Supports incremental deployments across multiple instances, meaning the roll-out is gradual. Hence we support that steps may be added that is only known to a sub-set of the running workflows.
42
46
43
47
**Scalable**
44
48
* You can add more workers in the workflow engine (vertical scaling)
45
49
* You can add more servers each running a workflow engine (horizontal scaling)
46
50
47
51
**No external dependencies**
48
52
* The core library has *no external dependencies*, you can use whatever database, logger, json/xml/binary serializer you want ... in any version you want
49
-
*Convenience supplement nuget packages for Newtonsoft json, Ado .net, and Autofac are provided
53
+
*To get you quickly started, we supply nuget packages for "Newtonsoft Json", "Ado .Net Db", and "Autofac IOC". The packages are completely optional.
50
54
51
55
52
56
# 2. Overview
@@ -61,11 +65,11 @@ Supported scalabilities
61
65
62
66
# 3. Getting started
63
67
64
-
To define a workflow with the two steps`FetchData`(which fetches some data), and `AnalyzeWords`(that analyzes the data), we implement interface `IStepImplementation` twice.
65
-
To transition from one step to one (or several steps), use `Done()`. This tells the engine that the current step has finished sucesfully. You can supply one or more steps that will be executed in the future.
68
+
To define a workflow with the two steps, a `FetchData`step that fetches some data, and a `AnalyzeWords`step that analyzes the data, we implement interface `IStepImplementation` twice.
69
+
To transition from one step to another, the step uses `return Done()`. This tells the engine that the current step has finished sucesfully. You can supply one or more steps that will be executed as a result of the success.
66
70
This is how you control ordering of events.
67
71
68
-
There are no restrictions on the names of steps, but we found using a scheme similar to REST api's is beneficial. Hence we recommend you to use `{version}/{business domain}/{workflow name}/{workflow step}`.
72
+
There are no restrictions on the names of steps, but we found using a scheme similar to REST api's to be beneficial. Hence using the following format `{version}/{business domain}/{workflow name}/{workflow step}`. By defining the name of the flow as a `public const` it is easy to "find usage" inside the code base and to ensure no mis-spelling. Two workflow steps cannot have the same name.
0 commit comments