As a presenter at Timisoara .NET Meetup #2 I thought it would be interesting to share with the local community some of my experience with a not so known technology from the .NET stack: Windows Workflow Foundation. For this purpose, I built a demo app (source code available on github) and a short introductory presentation for the topic.
The Rehosted Workflow Designer sample application
The goal of this example is to show how easy it is to implement a lot of powerful functionality with very little code. I created a WPF application which allows the user to design, manage & execute Workflows (plus real time execution logging); I also built a demo custom Activity Library & workflow which, via the activities implemented on top of the meetup.com rest api, returns the list of members that attended the meetup 🙂
Full source code is available on github: https://github.com/orosandrei/Rehosted-Workflow-Designer
About Windows Workflow Foundation
WF was introduced with the release of .NET 3 and it was used in Microsoft SharePoint 2007. Since then, the technology got a complete rewrite with .NET 4.0 which brought great performance improvements and by .NET 4.5 it received many updates which also made it easier to integrate in custom solutions.
When to use WF
Windows Workflows Foundation is a powerful technology and it is very useful when dealing with business logic that changes often, long running processes (nice support for persistence), BPMs (it has great support for State Machines & Flowcharts).
Currently the WF technology is only available for the Windows platform and it doesn’t look like it will be added to the new cross-platform .Net Core anytime soon. The Mono project started porting WF – it is part of its Olive incubation module, however from the github repository commits it looks like it hasn’t received any updates in the last 2 years.
If you really want to execute actions on Unix servers, there is one possibility #hack 🙂 – you could implement an activity that takes as an input a bash script which gets executed on Unix server via SSH; the result of the execution you can return in an Output parameter of the activity.
The future of Windows Workflow Foundation
Sharepoint 2013 & 2016, BizTalk and Dynamics CRM are Microsoft products that make use of WF, so support & maintenance for the latest version is safe in the next years.
From a development point of view, the technology received many updates with .Net 4.5. The latest .Net 4.6 release only added a small feature – FilterResumeTimeoutInSeconds – and in .Net Core WF is not included (yet). Microsoft seems to have shifted its strategy to favor the Azure cloud workflows services & automation development built on top of the Powershell Workflow runbooks (also WF based) and Azure Logic Apps (launched in march 2015).
- Update 2019
- Update November 2017
- I added
Roslyn based intellisense for Visual Basic custom ExpressionTextbox expressions & I also integrated @DustinMetzgar‘s custom C# expression editor
- I wrote about the state of Windows Workflow Foundation in 2017
- Windows Workflow Foundation port to .net core is now a community effort (CoreWF repository at https://github.com/dmetzgar/corewf ), without official support from Microsoft
- the focus of the WF development team at Microsoft in 2017 is on the .NET Framework (full)
- Workflow Manager (SharePoint)
- some accessibility items to the Workflow Designer
- I added
- Update October 2016:
- Update September 2016: work is being done to Port Workflow Foundation to CoreFx/CoreCLR; see https://github.com/dotnet/corefx/issues/2394#issuecomment-171471805 for business case and https://github.com/dotnet/corefx/issues/2394#issuecomment-244534065 for technical challenges
- Update February 2016: @DustinMetzgar, PM for Workflow Foundation at Microsoft, reached out and said that WF is not abandoned, but was considered Done and that they are supporting / maintaining it in the future as well; they are also getting feedback from the community regarding what features should be added next
Windows Workflow Foundation and .Net Core
Windows Workflow Foundation
What’s new in WF 4.5
A Developer’s Introduction to WF
Powershell Workflows & Azure Automation
WF 4x Code Samples
.Net Core port of Workflow Foundation Runtime and ETW Tracking
CoreFx/CoreCLR Issue – port of Worflow Foundation
* my Rehosted Workflow Designer on github
* my Introduction to Windows Workflow Foundation, embedded below: