Why use Windows Workflow? [closed]

The choice to use WF takes some evaluation and I’m going to try and provide a fairly comprehensive list here on what the pros and cons are. Keep in mind that if you’re going to use WF don’t use anything other than WF4+ because it was rewritten and is significantly vetted past its predecessors.

Pros

  • Cost
  • Flexibility
  • Durability
  • Distributability
  • Future

Cost

The cost of WF is important to note when comparing it against other paths. Those paths may include BizTalk, an open source code based framework like Objectflow, or even rolling your own. Bear in mind that unless you need something significantly simplistic, rolling your own would be the most expensive approach every time. So, if you need a sizable piece of functionality but also need control over the source code I would recommend an open source framework.

Flexibility

WF is a very flexible framework in contrast with a framework like BizTalk. In WF you can write your own custom activities and do what you need to do outside of the framework – this really gives you the power you need.

Durability

WF includes a very powerful durability framework. It’s durable in the sense that the state of a workflow can be persisted, the workflow can be set idle (to preserve resources), and then recalled later. But, that durability goes a lot further because it’s already setup for durability across a host farm. In other words a workflow can be started on one host, persisted, and then recalled on another host.

Assumes that the workflows are hosted via a web service (i.e. WorkflowService).

Distributability

WF is already setup to be distributed across a host farm.

Assumes that the workflows are hosted via a web service (i.e. WorkflowService).

Future

WF is the replacement orchestration engine for BizTalk and is in fact developed by the same people that built BizTalk. Therefore WF has a bright future in the Microsoft stack. In fact, right now Microsoft is working on building individual components to replace every feature of BizTalk with components. For example, Windows Server AppFabric (and more specifically the plug-in to IIS) is the replacement for the monitoring services that exist within BizTalk today.

Why is Microsoft doing this? Because BizTalk isn’t really well suited for the cloud because it’s one massive install, whereas the components they are building could be deployed to a cloud solution.

Cons

  • Flexibility
  • Monitoring

Flexibility

WF’s flexibility can also be its pitfall because sometimes you don’t need the flexibility that it provides and thus spend more time building stuff that you would otherwise want to just be included. Sometimes you need a framework that makes a lot of assumptions and maybe works off of convention instead (e.g. MVC). However, generally speaking I have found that this isn’t true when coupling the WF4 framework with the open source extensions provided by Ron Jacobs.

Monitoring

The monitoring for WF is still very young and this is its biggest pitfall. However, this will advance very quickly over time and in the meantime you can build your own monitoring tools with custom tracking mechanisms.

Resources

Your best resource is Ron Jacobs. I have never met somebody that is so willing to help the community of developers that have to use Microsoft’s frameworks than him. Believe me, he’s provided a vast amount of information surrounding WF via numerous channels, just get on Google and check it out.

Leave a Comment

tech