Blog #15

Blog #15

 17 Nov 2017

In a previous post I touched on Workflow Foundation (WF).  I used it in the past to give power users the option of amending business rules in their applications without the need a developer.

Whilst investigating WF and trawling the web for examples, it seemed that not many people were using it "in the wild".  With the advent of .NET Core, progress in terms of porting it to this new .NET platform has been slow.

That aside, it's worth sharing my experience should you be thinking of using WF in your project.

Why use it?

It gives you the ability to model process flows using a visual designer that's more akin to how humans think about such things.  It looks good and the drag and drop interface is simple to use.

Using the designer, you select Activities from the Toolbox and drop them onto the designer canvas then snap them together to form end to end processes.

As you create your workflow you supply Conditions and Expressions to these Activities to form the business rules that your need.  If you need to make a change to a particular rule, simply select the Activity in the designer and amend the relevant property.  It doesn't require much coding knowledge.


What can I build?

You can build 3 types of Workflow:

  1. Sequential

  2. Flowchart

  3. State Machine

More on these types in another blog post but know that regardless of the type, you still use Activities whether they be out of the box (Primitive) or Custom Activities, i.e. custom .NET code that inherits from the class CodeActivity.

How do I pass data in and out of my workflow?

When implementing a Workflow Service, you define a number of Data Contracts that describe the data it sends and receives.  These are messages that represent the objects your application deals with.


If you'd like to find out more, click the image below to Download 'Make Your Code More Readable, Secure & Maintainable'.

Or View Our Diary And Book In A Call

Also included:

  • How To Simplify Windows Service Development Using TopShelf
  • ASP.NET Patterns & Practices (MVC)
  • How To Implement Dynamic Business Rules In Your Application


I'd avoid using this technology at all costs. It works reliably in only the most trivial of cases. There are numerous issues, including serialization problems, deprecation of AppFabric, versioning, etc. This is an enterprise technology that simply does not scale to the enterprise demand. We finally ditched this technology for NServiceBus and haven't looked back once.
Posted on Monday, January 08, 2018 23:14 by andrew wright

Post Comment