When to use Windows Workflow Foundation?

Never. You will probably regret it:

  • Steep learning curve
  • Difficult to debug
  • Difficult to maintain
  • Doesn't provide enough power, flexibility, or productivity gain to justify its use
  • Can and will corrupt application state that cannot be recovered

The only time I could ever conceive of using WF is if I wanted to host the designer for an end-user and probably not even then.

Trust me, nothing will ever be as straightforward, powerful, or flexible as the code that you write to do exactly what you need it to do. Stay away from WF.

Of course, this is only my opinion, but I think it's a damn good one. :)


You may need WF only if any of the following are true:

  1. You have a long-running process.
  2. You have a process that changes frequently.
  3. You want a visual model of the process.

For more details, see Paul Andrew's post: What to use Windows Workflow Foundation for?

Please do not confuse or relate WF with visual programming of any kind. It is wrong and can lead to very bad architecture/design decisions.


The code generated by WF is nasty. The value that WF brings is in the visual representation of the system, although I have yet to see anything (6-7 projects at work now with WF that i've been involved with) where I would not have preferred a simpler hand coded project.