This blog has moved to http://blogs.msdn.com/b/appfabric please update your links!
I can’t believe it’s been a few months since my post on the Road to WF 4, and the expected impact of the new workflow model. It’s been a busy few months as the team develops and builds toward .NET 4; as we hosted an MVP Summit here in Redmond; and worked with TAP customers around using WF 4; and a few small scale shuffling around of job roles (one reason why you may not have seen much from me around updates on Channel9 and MSDN). And then, of course, there’s getting ready for TechEd in a couple weeks – we have some excellent presentations in store for Los Angeles, but I’ll circle back to that at the end of this article. All of that being said, I don't believe you're here for my digressions…
The team has been busy coding away since our conversations at the PDC in October. Soon, we will be releasing a public build of Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF), which will be made available with the beta 1 build of .NET 4 and Visual Studio 2010 <and before you ask: I don't know when the beta will be posted>. Starting with this release, the WCF and WF builds will be part of the all-up VS2010 public drops, and the new System.Xaml.dll is provided within the box, as opposed to out.
At the highest level, the beta includes a great number of enhancements: additional features have been added; the designer looks and performs better; and the codebase is much more stable. What I'd like to do is take a rather quick walk along the workflow-specific features new to the beta and point out some of the highlights, which we will explore in greater detail as we come upon the beta 1 release. To be clear, this particular entry is geared to the .NET developer that had attended the PDC or had the opportunity to evaluate the WCF/WF/’Dublin’ VPC that was distributed at the PDC and watch the recorded PDC sessions. My next blog entry will talk to the WF 3.x developer, and introduce the new workflow model being released as WF 4.
To begin on the CTP -> Beta 1 delta discussion, let's start with the building blocks of workflows - activities – and wind our way into the core.
The activity team has made several improvements that will immediately pop to anyone who worked with the CTP bits provided at the PDC: more out-of-the-box (OOTB) activities, clean up of the activities you saw in the CTP, API improvements in the activity object model that make it easy to write custom activities, and support for VB expressions end to end.
Out-of-the-box, the new workflow designer in beta 1 will ship with a larger set of OOTB activities than was available in the CTP's designer palette. These new activities include the following:
In addition to the new activities highlighted above, the beta simplifies the visual presentation of other activities to take up less real estate on the designer. Feedback we received from folks who saw and used the PDC bits was that they didn’t want too much information on the activity shape, so more information for the OOTB activities has been moved back to the property grid to make the workflow designer surface more readable without having to use the resizer.
On the topic around what’s not in the box, there are a number of activities that had been discussed at the PDC that you won’t find in the VS2010 beta 1 download, these include generic activities to interact with resources such as a database, with the file system, and with SharePoint. While it’s pretty clear that these won’t make it into the Framework 4 release, we are trying to find other ways to release them. For example, the beta 1 SDK includes a policy activity to interact with WF 3 rules sets. For those that don’t show up in the SDK, we are evaluating an option of making the activities available as a separate downloade post-Beta 1, but the location and timing of that is still being determined.
Two other major WF 4 activities that were discussed at PDC, a new state machine activity and a new forward chaining ruleset activity, will not be available with the VS2010 beta 1 release – and we will cover each of these topics in greater depth in the next month. At this point, a new forward chaining rules engine won’t be ready for the .NET 4 timeframe, and will probably see a CTP release post-VS2010 to gather feedback and to allow customers the opportunity to evaluate the direction we are considering. It’s important to note that we are working to ensure integration with the WF 3 rules engine will be possible in a number of ways, though; one example of integration back to the WF 3 rules engine is the SDK sample activity I mentioned above, For the state machine, we are unable to include a new state machine activity in WF 4, but our work with TAP customers leads us to expect that using a combination of the new FlowChart + Pick activities should satisfy a large majority of the current scenarios that folks are currently using the state machine activity for (again, we can and will dive into this as a follow-up post), and we look forward to getting customer feedback on the capabilities and limitations of using FlowChart + Pick once the beta is released.
The object model has changed between the PDC CTP release and Beta 1. While the core concepts have essentially remained the same, the class names have shifted a bit, and a couple new classes have been added into the mix. For most WF developers, there are really four activity classes that you will work with. Moving from the class with the fewest knobs to turn to the class that gives you full control, the activity classes are as follows:
The inheritance model among these four classes is presented below. In addition to the above, the beta release adds the generic WorkflowElement<T> class, which is useful for building expression activities (as an example of where this is used - the collection activities, mentioned above, inherit from the CodeActivity<T> class), and this is a topic for another blog post.
For most tasks, you will find that much of the custom activities authoring experience is the same between the CTP and Beta 1 builds. As we’ve been building WF 4, we have been doing usability work with customers and early adopters of WF 4 to improve the custom activity authoring experience (e.g., Beta 1 sees improvements around how developers interact with the ActivityExecutionContext), and look forward to your feedback from Beta 1 to make further refinements as we continue to progress towards RTM.
Before I move on to the designer experience, one other activity class that deserves a quick mention is the DynamicActivity. DynamicActivity allows you to add arguments (both InArgs and OutArgs) around what is essentially loose XAML – and use that within your workflows without requiring the XAML to be compiled – allowing for assembly of activities into a higher-level abstraction without having to create/develop additional custom activities. This is also something that will be worth digging into a bit deeper in a much more technical blog post as we dive in deeper into WF 4 activity development.
As you sit down and start to work with the beta 1 bits to design activities and workflows, there are a few items that really jump out at you:
The improvements should make the experience much more pleasurable and approachable than that available in the CTP.
This was a point that received a lot of discussion at PDC. With everything being in one Visual Studio and .NET build, this is now being delivered out of the box!
Tracking and tracing in WF 4 has changed quite a bit to improve performance and flexibility. In .NET 4, WCF and WF use much of the same tracking and tracing models, which provide consistency for .NET developers using both technologies, and makes it much easier to develop and host workflow services. WF 4 introduces the capability for WF developers to do use Event Tracing for Windows (ETW). This is an improvement that comes from the unification of the WCF and WF tracking, and is designed to provide more control to the folks managing a WF host at runtime while minimizing the performance overhead when tracking is enabled. This should provide tracking and tracing capabilities that developers and IT Pros can have more control over – specifying what to track, when to track it, and the level of verbosity to track. The beta builds upon the functionality released in the CTP, adding refinement and enhancements to tracking in WF:
Work continues as we complete the designer and tighten down performance, but we feel that the code is in a state where customers can begin to seriously prototype their solutions on the new WF model and evaluate if it meets their needs. To help you do that, another big effort with this beta milestone is around helping you understand what the new WF model is, and how you can use it to workflow-enable your applications and services.
Lastly, the team has put in a lot of effort around adding quality documentation and samples. With the CTP bits, the PDC session recordings and the hands on labs were perhaps the best place developers could go while experimenting with the bits. With beta 1, developers evaluating the beta release have a much better experience:
In addition to the above, we will be releasing a few additional items via the blog and the WF 4 Dev Center: David Chappell is writing a new whitepaper that introduces folks to The Workflow Way in .NET 4, the WF team is working on WF 3.x to WF 4 migration guidance documents that will help WF 3 developers understand the impact and options available with WF 4, and we will start doing blog posts and webcasts in the next month to aide developers in evaluating WF 4 – with some aimed at existing WF developers (discussing how existing WF developers should think about the new WF model) and others assuming no prior WF experience (simply introducing the new concepts and features).
And, at TechEd, there is opportunity for folks to discuss what’s coming:
I really hope that this is useful for you as you start to think about Visual Studio 2010 and .NET 4. I’m in the process of writing a complementary post around the WCF changes between the CTP and beta 1, which I hope to have up and posted by mid-week (May 6th-ish). I’ll then be taking a break from the writing while at TechEd (if you’re at the event, feel free to visit the booth and say hi), and then dive back into the word processor to pull together a ‘WF 4 for the .NET 3.5 developer’ to highlight changes since .NET 3.x.
There’s a problem with doing these really long posts – they’re hard to work into the work week. :)
Note: Thanks to Jurgen Willis, Kavita Kamani, Vikram Desai, and Bob Schmidt for their invaluable feedback and help on this entry.
Thank you for submitting this cool story - Trackback from DotNetShoutout
Can't sleep, so may as well ship another one of these. Software Development Tools TestDriven.Net 2,21: Now includes NUnit 2.5 - One of my most essential toools has been upgraded includes a major new NUnit release as well as some other new features Windows
Quick question: Will the new WPF based WF designer in VS 2010 will be able to rehosted on custom applications as in the previous 3.0/3.5 WF designer? Thanks.
@huseyint: Yes; absolutely - and rehosting the WPF designer is actually much simpler in WF 4 (3 lines of code for the simplest level rehosting) and easier to customize the look and feel. As an example of simple rehosting, Matt Winkler demonstrated the designer rehosting on the CTP bits in his PDC session (http://channel9.msdn.com/pdc2008/TL21/) - while the bits are a bit dated, it does a good job of showing what can be done. Also, the fact that it's WPF-based provides some flexibility to skin the rehosted designer in ways that were quite hard in WF 3.x.
As I mentioned in my post last week covering the changes in WF 4 since the CTP release , I promised that
Yes! It's time. Visual Studio 2010 and .NET Framework 4.0 Beta1 is available for general download now.
Interesting decision to release v4.0 of WF without in my opinion two most important components: Rule engine and State machine... At least I seen those two components as the most important reason to use WF today...
@zoranjovanovic - Thanks for your comment re: Rules and State Machine. Please check out migration guidance that we've posted -
Lead Program Manager, Windows Workflow Foundation