title: Thoughts and Experiences with Workflow Foundation 4
body: <p>Now that Microsoft has revamped their workflow framework in Windows Workflow Foundation 4, what are your thoughts and experiences with this new framework?</p>
  
  <p>I have been working with WF4 for a few months now, and I have run into a few pitfalls:</p>
  
  <ul>
  <li>There's no way to enforce an interface with Workflow Services (Xamlx).</li>
  <li>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.</li>
  <li>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.</li>
  <li>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.</li>
  <li>No persistence provider for Oracle.</li>
  </ul>
  
  <p>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.</p>
  
  <p>I'm curious about the experiences of the other developers using Workflow Foundation 4.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>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. </p>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/169b0a04-2a27-457a-96a0-052d07cd17d4" rel="nofollow">I posted on the MSDN forums about this issue.</a></p>
  
  <p><strong>Update</strong></p>
  
  <p>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.</p>