Rehosted Workflow Foundation Designer

Windows Workflow Foundation – Rehosting the Workflow Designer

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

Workflow Foundation Rehosted 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.

Windows Workflow Foundation Architecture

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).

Unix scenarios

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.

Windows Workflow Foundation Unix .Net Core

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).

References

Windows Workflow Foundation and .Net Core
Windows Workflow Foundation
What’s new in WF 4.5
A Developer’s Introduction to WF
Workflow Manager
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:

14 thoughts on “Windows Workflow Foundation – Rehosting the Workflow Designer”

  1. Hello,

    I downloaded the sample application and it compiles and run without any problems. However, when I create and try to save a sequence workflow with a nested for-each activity, and inside the for-each an IF-Else Activity, the saved file will not contain the nested if-else activity. How can I overcome this problem ?

    Thanks,
    Hratch

      1. Thanks a lot. It worked. Any other activities I should worry about, or this problem is confined to ForEach and Parallel Foreach only ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.