Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
363 views
in Technique[技术] by (71.8m points)

asp.net - What are your experiences with Windows Workflow Foundation?

I am evaluating WF for use in line of business applications on the web, and I would love to hear some recent first-hand accounts of this technology.

My main interest here is in improving the maintainability of projects and maybe in increasing developer productivity when working on complex processes that change frequently.

I really like the idea of WF, however it seems to be relatively unknown and many older comments I've come across mention that it's overwhelmingly complex once you get into it.

If it's overdesigned to the point that it's unusable (or a bad tradeoff) for a small to medium-sized project, that's something that I need to know.

Of course, it has been out since late 2006, so perhaps it has matured. If that's the case, that's another piece of information that would be very helpful!

Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Windows Workflow Foundation is a very capable product but still very much in its 1st version :-(

The main reasons for use include:

  1. Visually modeling business requirements.
  2. Separating your business logic from the business rules and externalizing rules as XML files.
  3. Seperating your business flow from you application by externalizing your workflows as XML files.
  4. Creating long running processes with the automatic ability to react if nothing has happened for some extended period of time. For example an invoice not being paid.
  5. Automatic persistence of long running workflows to keep resource usage down and allow a process and/or machine to restart.
  6. Automatic tracking of workflows helping with business requirements.

WF comes as a library/framework so most of the time you need to write the host that instantiates the WF runtime. That said, using WCF hosted in IIS is a viable solution and saves a lot of work. However the WCF/WF coupling is less than perfect and needs some serious work. See here http://msmvps.com/blogs/theproblemsolver/archive/2008/08/06/using-a-transactionscopeactivity-with-a-wcf-receiveactivity.aspx for more details. Expect quite a few changes/enhancements in the next version.

WF (and WCF) are pretty central to a lot of the new stuff coming out of Microsoft. You can expect some interesting announcements during the PDC.

BTW keeping multiple versions of a workflow running takes a bit of work but that is mostly standard .NET. I just did a series of blog posts on the subject starting here: http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx

About visually modeling business requirements. In theory this works quite well with a separation of intent and implementation. However in practice you will drop quite a few extra activities on a workflow purely for technical reasons and that sort of defeats the purpose as You have to tell a business analyst to ignore half the shapes and lines.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...