Workflow Foundation 4 的想法和经验

发布于 2024-10-08 14:00:22 字数 1009 浏览 0 评论 0原文

既然 Microsoft 已经在 Windows Workflow Foundation 4 中改进了他们的工作流框架,您对这个新框架有何想法和体验?

我使用 WF4 已有几个月了,但遇到了一些陷阱:

  • 无法强制使用工作流服务 (Xamlx) 的接口。
  • 当工作流中发生错误时,无论是工作流中的通信、关联、持久性还是某些未处理的异常,几乎不可能判断出了什么问题,因为跟踪日志没有告诉您任何相关信息。例如,我有一个实体框架对象作为工作流变量,并且工作流持久性在序列化它时遇到了一些问题。不幸的是,跟踪文件中的任何错误都表明这就是问题所在。在我弄清楚出了什么问题之前,我经历了很多小时的反复试验。
  • 所提供的一些活动还不够。例如,我必须扩展发送活动以支持动态端点。不幸的是,我无法使其完全动态,例如,接口名称不能是动态的。
  • 如果工作流程变得太大,设计器就会变得非常慢。一个大小超过 100KB 的工作流程需要一分多钟才能加载!并且忘记调试这种规模的工作流程。
  • Oracle 没有持久性提供程序。

尽管存在缺陷,但数据库的持久性功能、在设计器中将活动捕捉到一起的轻松性以及将 WCF 服务设置为工作流服务的轻松性给我留下了深刻的印象。

我很好奇其他开发人员使用 Workflow Foundation 4 的体验。

编辑:

我能够解决大型工作流程设计器速度极慢的问题。结果发现存在无法解析的Imports,这显然给设计师带来了很大的压力。

我在 MSDN 论坛上发布了有关

更新

AppFabric 在生产环境中运行后,我们面临着一系列问题。我很清楚,AppFabric 工作流服务目前尚未准备好使用。在新版本发布之前我会远离这个。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过度放纵 2024-10-15 14:00:22

我认为您对 WF4 问题做了很好的总结。

我的主要痛点是无法更改正在进行的工作流程的定义。虽然这个问题将在下一个版本中得到修复,但目前这是一个大问题。

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.

天暗了我发光 2024-10-15 14:00:22

我在处理工作流程中的异常时也遇到了困难 - 主要是确定异常发生的原因、来源以及描述或消息。随着我获得更多经验,我在这方面做得越来越好,如果我开始另一个工作流程项目,我将能够更有效地调试它。这只是一种不同的范例,因此不能以与直接代码相同的方式进行处理。

我在使用 WF 4.0 时遇到的另一个问题是使用 WorkflowInvoker 进行单元测试;具体细节我没有注意到,但模拟依赖关系和父/子工作流程确实令人头疼。

总的来说,我真的很喜欢 WF 4.0,它比 3.5 有了巨大的改进。在调试模式下运行可能会非常慢,在设计器中进行调试比其价值更麻烦,但该框架很棒并且非常有用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文