Over the years, this blog has been about many different things related to software development with Microsoft technologies. Since my current role focuses on PowerApps & Flow, that's what it's primarily about right now.
When the Windows Workflow Foundation (WF) was first introduced in the .NET Framework 3.0, the only way to host a workflow in a client application was to use the WorkflowRuntime class programmatically, start the runtime, and create/start an instance of a workflow. Furthermore, if you wanted to communicate between the client code and the workflow logic, you needed to use a ExternalDataExchangeService. This required a fair amount coding effort to get even the simplest of workflows up and running. The .NET Framework 3.5 introduced Workflow Services which are Windows Communication Foundation (WCF) Services authored as workflows. Workflow Services give you a new way to accomplish this scenario using a much simpler, cleaner, and arguably more elegant approach. In this three part screencast, I show you how to improve on the more manual hosting + ExternalDataExchangeServices approach by hosting a workflow in a client executable using Workflow Service.
Part I – Reviewing the SimpleExpenseReport application from the Create a Sequential Workflow tutorial so we can compare the two approaches. The application explicitly hosts the WorkflowRuntime & uses ExternalDataExchangeService
Part II – Walking through the fundamentals of creating a Workflow Service and hosting the Workflow Service locally
Part III – Walking through my rewrite of the SimpleExpenseReport application using Workflow Services.
The demos require Visual Studio 2008 and depend on a SQL Server 2005 database. I made the database available for download as well. You’ll have to attach it to your SQL/SQL Express instance and make sure the connection strings in the project are correct. You’ll notice that I didn’t include a download for the WPF demo. That’s because the UI in the Sync demo is the exact same UI from the WPF demo.
I mentioned recorded/upcoming webcasts a few times during the presentation. You can find a list of all my recorded webcasts at http://devkeydet.com. Here are the recorded webcasts related to the topics I covered:
*** These webcasts are fairly old. They are based on .NET 3.0 / VS 2005. The core concepts obviously apply, but the developer experience for all of these technologies has greatly improved in Visual Studio 2008.
I also mentioned my webcast on Thursday. I’ll be presenting a deeper dive into the Microsoft Synchronization Services for ADO.NET. Details are here.
Thanks to everyone who attended. Sorry for the technical difficulties with Live Meeting as well as accidentally doing one of my demos out of order. Hopefully it wasn’t too confusing.
The deck is here. The demos I used are split into a few downloads. The ones built from scratch are here. The SimpleExpenseReport demo is here. This is the one where both the client service and the workflow service are hosted in the client .exe. I hope to publish a channel 9 screencast next week some time showing, step by step, how to build it. Both the “Long Running Work via Messaging” and the “Conversations” demos are part of the Visual Studio 2008 and .NET Framework 3.5 Training Kit which is a free download.
The Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) are two very relevant technologies within .NET 3.x for Public Sector applications. WCF represents a total unification layer for building connected systems and WF provides a powerful foundation for process reengineering. Combine them and you have an unbelievable set of capabilities for building robust enterprise application that involve both process automation as well as human and machine to machine workflow and process communication. Come learn the basis of how to build WCF services using workflow foundation in Visual Studio 2008.