I am a big fan of Windows Workflow Foundation (WF). After deciding not to use it 6 years ago on a project and seeing the resulting mess of a dictionary based workflow system, I was convinced there had to be a better way. So when we started a new project to build an order processing workflow I knew we had to try it. It wasn’t all rainbows and unicorns but we worked through issues and found immense value from the framework. My friend and Birmingham .NET Meetup co-founder Blake Helms has many great posts about Workflow on his blog if you are interested:
One of his WF intro posts does a great job of highlighting the big benefits of WF:
- It’s visual
- It naturally lends itself to testability
- It’s great for long running processes
- It’s built into the .NET framework
- You’re not locked in
The visual aspect of WF is the biggest benefit I see. It is so much easier to see complex workflows visually. These visualizations make it infinitely easier to share how a system works with the business, customers and/or anyone not familiar with the code. Even the developers that built our new system find it much easier to jump back into the logic with WF after working on other projects and coming back. We really believe its one of the hidden gems in .NET. Apparently, we are not alone.
The newest version of .NET (Core) is open source, cross-platform and much faster but it doesn’t contain all the same framework bits as previous versions. The .NET team started with the most used APIs and is expanding it further over time based on interest from the community. One of the major ways they are accepting that feedback is through issues on Github. There are 4,908 closed and 1,322 open issues as I’m writing this. These are a mix of bugs and feature requests but if you filter the list to issues with the “port-to-core” label there are 115 closed and 27 open.
Last July Gutemberg Ribeiro opened an issue to ask how he could help port WF to .NET Core. Since then more than 40 people have provided 132 comments showing support and/or discussing the possibility of porting WF to Core. This makes it the most commented open issue currently on the dotnet/corefx repo and the third most commented issue of all time.
So what’s the Status?
If you have the time to read all 132 posts, its actually very interesting to see the challenges involved with porting WF to Core, all the great ideas from the community and the responsiveness from the .NET team. I will attempt to summarize the situation.
Windows Workflow was originally released with .NET 3 and had a significant update (rewrite) in .NET 4. It is coupled to much of the .NET framework (Transactions, WCF, Serialization, and XAML) thus for it to be ported to Core its dependencies must be ported or replaced. The biggest dependency issue is XAML. WF is tightly coupled to XAML and XAML has not been ported to Core but it also has its own active issue with 108 comments. Part of the discussion on this issue has been whether XAML should be ported to Core or if WF on Core should use an alternative design language. XAML does have some issues, namely it is hard to merge XAML changes, the designer can be frustrating/buggy at times and its difficult to build visualizations/designers outside of VisualStudio. The primary suggestions have been to use XML, HTML or JSON instead.
Dustin Metzgar (the PM for WF at Microsoft) and team released an unofficial port of the WF runtime for .NET Core on Github. It’s missing several features (XAML integration, debugger, transactions, C# expressions) but has basic functionality. Checkout the repo for more details:
The latest comments on the thread are from more legacy WF users asking when/if it will be supported but we have still not heard any official word from Microsoft yet.
Call to Action
Dustin clarified how we can get the decision makers’ attention and make the case to port WF to Core, participate in the conversation!
You can add a comment showing your support, like the comments that you agree with and subscribe to the issue so you can see updates to the conversation.
If you aren’t using .NET Core yet, WF is a great framework for building workflow in .NET. Give it a try and then help us get Microsoft to support it in .NET Core.