.net – When to use Windows Workflow Foundation?

networkflowworkflow-foundation

Some things are easier to implement just by hand (code), but some are easier through WF. It looks like WF can be used to create (almost) any kind of algorithm. So (theoretically) I can do all my logic in WF, but it's probably a bad idea to do it for all projects.

In what situations is it a good idea to use WF and when will it make things harder then they have to be? What are pros and cons/cost of WF vs. coding by hand?

Best Answer

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.