Let’s set the stage. Where are we now with .NET Framework 3.0 , and WCF and WF in particular?
WCF in version 1 brought us a programming model and runtime, consisting of a
- Service model: the endpoints, bindings and contracts. This is where most of your code goes.
- Channel layer: does the messaging part of the work. It’s reasonably hard to write code here, but the extensibility is fenomenal.
The v1 of WCF gave you enough to build secure, reliable and transacted services. With the extensible architecture you can tailor WCF for your own needs.
Was WCF all finished? Not really. First of all, WCF will evolve and grow. But, because of constraints on the time schedule of .NET FX 3.0, there were a couple of evident caveats in WCF:
- Programming for a web scenario is difficult. Although POX (Plain Old Xml) and HTTP GET is supported,
- Configuration file generation and improvement for testing and debugging.
- Hosting and XBAP scenarios that require partial trust. The service model assembly is not annotated with the AllowPartiallyTrustedCallers (APTCA) attribute.
- No links to and from WF.
On the other side we have WF. In short this gives you:
- A flexible and declarative workflow runtime, plus out-of-the-box activities and great tooling
- An extensible runtime service model with structured activity execution semantics, that you can host anywhere you can get the CLR runtime loaded.
- Declarative and forward-chaining rules engine, that can be used inside of WF, but are separate from the process. It can even be used outside of WF in any piece of .NET code.
So, what hurts in WF?
Well, for one it is a lot of work to have communication from host to workflow and vice versa. It takes like a million steps to get that going. Then there is communication with (web services). The Web Service activity is pretty basic, pinning you to WS-I Basic Profile and ASMX hosting with little customization and extensibility capabilities. Worst of all, there is no integration with WCF giving simple consumption and hosting.
It is the next release, codenamed Silver, that has a mission to bring durable, long lasting conversation to the space of WCF and WF. It will allow dispatching of WCF message to running WF instances. Silver is also referred to as WF Services.
WCF and WF are actually close to one another and dove-tail together. They are the yin and yang of .NET 3.0. But making them work together requires a lot of handwritten custom code. The Silver release will change this and marry the two together. So, it should help you get rid of all of the shortcomings mentioned above. Not only that, is will bring the paradigms of BizTalk (A central queue where messages are dropped and picked up. No message gets left behind) and WCF (Dispatching mechanism that faults messages back to you if it doesn’t look right) together.
In the Silver implementation the dispatching work from WF to WCF and the other way occurs at such a high level (or low if you will) that all transports are available. So, communication with a MSMQ queue from your workflow should be a no-brainer if you use a WCF service. Good stuff is coming.
Orcas and Silver will be the topic for the next three days on the WCF+WF Orcas training I am at. I’ll keep you posted on the interesting things that I pick up. There might be some out-of-band postings on other stuff.