Thoughts and Experiences with Workflow Foundation 4

Now that Microsoft has revamped their workflow framework in Windows Workflow Foundation 4, what are your thoughts and experiences with this new framework?

I have been working with WF4 for a few months now, and I have run into a few pitfalls:

  • There's no way to enforce an interface with Workflow Services (Xamlx).
  • When an error occurs in the workflow, whether it is with communication, correlation, persistence, or some unhandled exception in the workflow, it's almost impossible to tell what went wrong because the trace logs tell you nothing relevant. For example, I had an Entity Framework object as a workflow variable and the workflow persistence had some trouble serializing it. Unfortunately, non of the errors in the trace files indicated that this was the problem. I went through many hours of trial and error before I figured out what went wrong.
  • Some of the provided activities are insufficient. For example, I had to extend the Send activity to support dynamic endpoints. Unfortunately, I wasn't able to make it completely dynamic, for example, the interface name cannot be dynamic.
  • If a workflow gets too big, the designer becomes very slow. One workflow that's over 100KB in size took more than a minute to load! And forget about debugging a workflow of this size.
  • No persistence provider for Oracle.
  • Despite the pitfalls, I'm very impressed with the persistence capabilities to the database, the ease of snapping activities together in the designer, and the ease of setting up WCF services as workflow services.

    I'm curious about the experiences of the other developers using Workflow Foundation 4.

    Edit:

    I was able to solve the problem of the extremely slow designer for large workflows. It turned out that there were unresolvable Imports, which apparently causes the designer a lot of stress.

    I posted on the MSDN forums about this issue.

    Update

    There are a slew of problems that we are facing with AppFabric, now that we're running in production. It is clear to me that AppFabric Workflow Services, as of now, are not ready for use. I would stay away from this until new versions are released.


    I think you did a pretty good summary of the WF4 issues.

    My main pain point is the inability to change the definition of in process workflows. That is being fixed in the next version though but for now a big problem.


    I also had difficulties with exceptions in workflows - mostly determining why they occurred, the source, and a description or message. I got better at this as I gained more experience, and if I began another workflow project I'd be able to debug it far more efficiently. It's just a different paradigm and so can't be approached the same way as straight code.

    Another issue I had with WF 4.0 was unit testing with WorkflowInvoker ; the specifics escape me but mocking dependencies and parent/child workflows was a real headache.

    Generally I really like WF 4.0, a massive improvement over 3.5. Running in debug mode can be very slow, debugging in the designer is more trouble than it's worth, but the framework is great and very usable.

    链接地址: http://www.djcxy.com/p/61520.html

    上一篇: Windows Azure和其他NLB环境中的WF4 Affinity

    下一篇: 使用Workflow Foundation的想法和经验4