为什么要使用Windows工作流?工作流、要使、Windows

2023-09-02 12:01:13 作者:不如看淡别离

什么是使用的Windows Workflow Foundation(WF)与滚动自己的工作流程框架的好处?

What is the benefit of using Windows Workflow foundation (WF) versus rolling your own workflow framework?

这是我可以告诉,WF只是提供了一个pretty的裸机运行时引擎,一堆类,定义工作流架构(基于XAML)。所有坚硬的东西,如持久性,为运行时提供一个宿主进程,并实现分布式工作流程(整个过程)是留给你。

From what I can tell, WF only provides a pretty bare-bones runtime engine, a bunch of classes, and a schema (XAML-based) for defining workflows. All the hard stuff such as persistence, providing a host process for the runtime, and implementing distributed workflows (across processes) is left up to you.

再加上有一个学习曲线,使用WF ......如果我们创建了自己的工作流框架中,我们将简单地利用技能,所有的开发人员已经有了(C#,XML,SQL等)。

Plus there is a learning curve to using WF... if we created our own workflow framework we would simply leverage skills that all developers already have (C#, XML, SQL, etc).

我看到这个博客从MS传播者它试图解释为什么我们应该使用WF:

I saw this blog from an MS evangelist which tries to explain why we should use WF:

为什么要工作流?...

国际海事组织它不会做说服了很好的工作,因为它只是说,它可以帮助开发人员的生产力,同时承认开发商可以推出自己的。

IMO it doesn't do a good job of convincing because it just states that it helps "developer productivity", while admitting that developers could roll their own.

可以在任何智能的乡亲在这里拿出一个更好的理由吗?

Can any of the smart folks here come up with a better reason?

总结从答复如下:

我觉得最有说服力的理由是,使用一个标准化的工作流平台,如WF(而不是滚动您自己)将允许您利用当前和未来的工具,如可视化设计,通过MS和第三方提供的。

I think the most convincing reason is that using a standardized workflow platform such as WF (versus rolling your own) will allow you to leverage current and future tooling such as the Visual Designer, provided by MS and third parties.

此外,因为它是基于.NET技术的MS堆栈的一部分,这将可能有更好的整合/迁移路径与未来的质谱技术(如天青)。

Also because it is part of the MS stack of .NET based technologies, it will likely have better integration/migration path with future MS technologies (such as Azure).

最后,开发商与WF经验的数量会增加(因为这将有利于他们的职业生涯明智的),把它变成一个基本商品的技能,如SQL或HTML,这意味着它会更容易找到人谁可以开始工作它以最小的加速时间。

Finally, the number of developers with WF experience will increase (as it will benefit them career-wise), turning it into a basic commodity skill such as SQL or HTML, meaning it will become easier to find people who can start working with it with minimal ramp up time.

推荐答案

使用WF的选择需要一些评价,我要去尝试,并提供了相当COM prehensive列表在这里什么利弊。请记住,如果你打算使用WF不要使用任何非WF 4 +等,因为它被重写并显著核实过去的predecessors。

The choice to use WF takes some evaluation and I'm going to try and provide a fairly comprehensive list here on what the pros and cons are. Keep in mind that if you're going to use WF don't use anything other than WF4+ because it was rewritten and is significantly vetted past its predecessors.

成本 灵活性 耐久度 可分布 未来

WF的成本是要注意对其他的路径进行比较,当它。这些路径可能包括的BizTalk ,喜欢的 Objectflow ,甚至滚动您自己。记住,除非你需要的东西显著简单,滚动您自己将是最昂贵的方法每次。所以,如果你需要一个相当大的一部分功能,但还需要在源$ C ​​$ C控制,我会建议一个开源框架。

The cost of WF is important to note when comparing it against other paths. Those paths may include BizTalk, an open source code based framework like Objectflow, or even rolling your own. Bear in mind that unless you need something significantly simplistic, rolling your own would be the most expensive approach every time. So, if you need a sizable piece of functionality but also need control over the source code I would recommend an open source framework.

WF是在与像的BizTalk一个框架对比度的非常灵活的框架。在WF您可以编写自己的自定义活动,做你需要做的框架之外 - 这真的为您提供所需的电力

WF is a very flexible framework in contrast with a framework like BizTalk. In WF you can write your own custom activities and do what you need to do outside of the framework - this really gives you the power you need.

WF包括一个非常强大的持久性框架。它的耐用在这个意义上,一个工作流的状态可以持续的工作流程可以设定闲置状态(以preserve资源),再后来回忆说。 但是,耐久性走得更远,因为它已经建立了跨主机农场的耐用性。换句话说,工作流可以在一台主机上启动,坚持,再回忆起另一台主机上。

WF includes a very powerful durability framework. It's durable in the sense that the state of a workflow can be persisted, the workflow can be set idle (to preserve resources), and then recalled later. But, that durability goes a lot further because it's already setup for durability across a host farm. In other words a workflow can be started on one host, persisted, and then recalled on another host.

假定工作流通过Web服务(即WorkflowService)主办。

WF已经安装到分布在一台主机的农场。

WF is already setup to be distributed across a host farm.

假定工作流通过Web服务(即WorkflowService)主办。

WF是更换业务流程引擎的BizTalk实际上是在由同一人所建立起来的BizTalk开发。因此WF有一个光明的未来在微软堆栈。事实上,现在微软正在建设各个组件更换的BizTalk的每一项功能与组件。例如,的Windows Server AppFabric的(多具体地,插件​​IIS)是替换为今天内的BizTalk存在,监测服务。

WF is the replacement orchestration engine for BizTalk and is in fact developed by the same people that built BizTalk. Therefore WF has a bright future in the Microsoft stack. In fact, right now Microsoft is working on building individual components to replace every feature of BizTalk with components. For example, Windows Server AppFabric (and more specifically the plug-in to IIS) is the replacement for the monitoring services that exist within BizTalk today.

Microsoft为什么要这样做?原因是BizTalk是不是真的适合云计算,因为它是一台庞大的安装,而他们正在建设的组成部分可以被部署到云解决方案。

Why is Microsoft doing this? Because BizTalk isn't really well suited for the cloud because it's one massive install, whereas the components they are building could be deployed to a cloud solution.

灵活性 监控

WF的灵活性,也可以是它的缺陷,因为有时你并不需要的灵活性,它提供了,因此花更多的时间来构建的东西,否则你会想只被包括在内。有时候,你需要一个框架,使得很多的假设,也许工作过约定,而不是(如MVC)。但总的来讲我发现,这种耦合的WF4框架与开源扩展由Ron雅各布提供的。

WF's flexibility can also be its pitfall because sometimes you don't need the flexibility that it provides and thus spend more time building stuff that you would otherwise want to just be included. Sometimes you need a framework that makes a lot of assumptions and maybe works off of convention instead (e.g. MVC). However, generally speaking I have found that this isn't true when coupling the WF4 framework with the open source extensions provided by Ron Jacobs.

的监测WF还很年轻,这是其最大的缺陷。然而,这将推动非常很快随着时间的推移而在此期间,你可以建立自己的监控工具的自定义跟踪机制。

The monitoring for WF is still very young and this is its biggest pitfall. However, this will advance very quickly over time and in the meantime you can build your own monitoring tools with custom tracking mechanisms.

您最好的资源就是罗恩雅各布。我从来没有见过有人是这样愿意帮助那些有使用微软的框架,比他的开发人员社区。相信我,他提供了通过多种渠道WF周围大量资料,只是获得谷歌和检查出来。

Your best resource is Ron Jacobs. I have never met somebody that is so willing to help the community of developers that have to use Microsoft's frameworks than him. Believe me, he's provided a vast amount of information surrounding WF via numerous channels, just get on Google and check it out.