# Introducing ObjectFlow

DevFeed: [Introducing ObjectFlow](<https://devfeed.tech/articles/introducing-objectflow-33362.md>)

Original publisher: [Read original article](<https://timkellogg.me/blog/2011/03/14/introducing-objectflow>)

Published: 2011-03-14T00:00:00Z

Content type: article

Language: en

Sources: [Tim Kellogg](<https://devfeed.tech/sources/tim-kellogg.md>)

Topics: [C#](<https://devfeed.tech/topics/csharp.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>)

Tags: [business-logic](<https://devfeed.tech/tags/business-logic.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [workflow](<https://devfeed.tech/tags/workflow.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

## AI overview

The article introduces ObjectFlow, a C# workflow library designed to make workflows easy to define and understand. It describes contributed functionality for workflows that pause for human interaction, demonstrates a stateful workflow with a sample code path, and emphasizes separating workflow logic from business logic.

## Source excerpt

I've been assigned to create a light and flexible workflow for two separate projects. After doing some research, I found that there really aren't any light, easy to use and understand, workflows. I noticed that objectflow lets you define workflows in C# with an easy-to-read fluent interface, but after digging into it I realized it was missing some crucial features. For instance, there was no clear way that you could pause a workflow in the middle so that a real person can interact with it.I contacted the maintainer of the project and have contributed a large portion of functionality that makes it easy to define workflows that include people. Here is a sample workflow:var open = Declare.Step();var wf = new StatefulWorkflow<SiteVisit>("Site Visit Workflow") .Do(x => x.GatherInformation()) .Define(defineAs: open) .Yield(SiteVisit.States.Open) .Unless(x => x.Validate(), otherwise: open) .Do(x => x.PostVisit());// And send an object throughvar visit = new SiteVisit();wf.Start(visit);// It stops at the Yield, maybe persist it in a database and display a page to the userwf.Start(visit);// extension methods to check if it's still in the workflowif (visit.IsAliveInWorkflow("Site Visit Workflow")) wf.Start(visit);This workflow is fairly simple and demonstrates how you can create a module for defining workflow and isolate all business logic in data objects (models and view-models work great here). I was initially concerned with the idea of creating conditional goto constructs, but after more thought I decided that this shouldn't be a significant problem as long as workflows stay simple and there is a clear separation from business logic and workflow logic.There is a lot more to this project - and to the features I contributed. However, I haven't even put forth a good effort in developing the official documentation, so perhaps I'll write about this more after developing the core documentation a little more. I think this is an excellent solution for companies who want to quickly