In an interesting post, Cliff Simpkins (senior product manager in the .NET product marketing group for Windows Workflow Foundation) has shared other news about the future Workflow platform.
I think that everyone of us that is involved on developing large .NET applications that makes use of Windows Workflow for certain business process, are a bit worried about the future direction of this platform. The common question is: if I write a .NET application that uses WF 3.5 now, should I rewrite it the next year or when WF 4.0 will be released?
In this post Cliff explains the key concepts:
WF 4.0 will have the following improvements:
- Explicit Activities Data Model: We are providing an explicit, system provided data model for WF 4.0 activities. The activity data model lets you reason about and manipulate workflow data using variables (for storage) and arguments to manage how data flows into and out of activities (for those interested, Matt Winkler did a great PDC session discussing activities in WF 4.0).
- Fully declarative authoring model: WF 4.0 provides XAML-based workflow capability to provide you with flexibility across deployment, versioning, and tooling - allowing your workflows to express what your business process or application is doing, and allowing your custom activities to handle how the work is actually accomplished.
In 4.0, workflows can now be written and executed using no-code (for those interested, there was a great PDC session by Kenny Wolf demonstrating this), and this also improves the ability for tooling to read and write WF workflows. - Increased performance: Performance was a strong thread in the feedback we received. In the new 4.0 model, we focused on greatly simplifying system demands by the architecture during workflow creation, serialization, and runtime. Performance was increased by factors of 10-100 over our WF 3.0 performance numbers.
- Deep WCF integration: The next release also provides a rich out of the box hosting environment for WCF workflow services. As we released 3.0, customer feedback highlighted the natural partnership between WCF and WF. The new architecture focuses on making it easier for you to model complex communication patterns in a fully-declarative fashion, providing sophisticated message correlation, the ability to flow transactions, and improved exception handling.
If you use WF 3.5 now for your applications (and I'm one of this guys
), you will have these options with the new .NET 4.0 runtime:
- Side by side operation: we will be including the namespaces and designers for both WF 3.x and WF 4.0. The team is going through great pains to make sure that WF 3.x developers and customers are not stuck. WF 4.0 uses a different namespace, different [WPF-based] designer, and different persistence schema.
Doing this delivers on a Framework-wide promise of running prior versions. 3.x workflows can continue to be used, maintained, and supported as long as they need to be. And if your need for 3.x support is defined as ‘we will stay on 3.x and use other aspects of .NET 4.0’, well, that’s an option to…but we really think you’ll like what you see in WF 4.0. - Interop activity: Current WF customers have created a lot of activity and workflow artifacts. With WF 4.0, we will ship an Interop activity; the purpose of the Interop activity is to enable seamless execution of a 3.x activity/workflow within a 4.0 workflow. As we dive into the design improvements in WF 4.0, it will become clear why you can’t just drop 3.x activities onto a 4.0 workflow, but that’s a much longer discussion for another time.
- Updating your 3.x code: As you would expect, the third option is that of updating your code to take advantage of all that WF 4.0 has to offer. We will be publishing the initial guidance on this with the release of .NET 4.0 Beta 1. Depending on how you wrote your code and markup today, this could be an easy migration or a difficult one.
My personal opinion? Don't be worried about the future WF 4.0 platform and if you love Windows Workflow and you think that it can help you on your applications, don't stop to use it. If you work on the right manner (for example, Custom Activities...) your code will be ready for a simple migration to the new platform.
Cliff was kind enough to answer me also about Designer Rehosting future (a topic too cool for me...): the WF team has made it much easier to rehost the designer. Using XAML for WF 4.0 has made it possible to rehost the designer on a WPF form using about three lines of code. This makes is possible to construct your custom designer in Expression; which looks pretty snazzy compared to the rehosted designers of 3.x.
Cool... 