Windows Workflow Foundation 示例 - 审核

发布于 2024-07-14 06:58:24 字数 547 浏览 3 评论 0 原文

作为我的个人改进计划 (PIP™) 的一部分,我正在尝试学习 Windows Workflow Foundation 的基础知识。

我决定编写一个相当简单的博客引擎。 我知道那里有很多东西,但这只是一个我可以用来学习一些很酷的东西的游乐场项目。 我想要实现的主要功能之一是使用 WF 来审核博客条目。 该项目的其余部分将是一个 ASP.NET MVC 应用程序,可能会撒上一些 WCF。

根据我所读到的有关 WF 的内容,我应该使用顺序工作流程,该工作流程应如下所示:

  1. 作者添加/编辑博客条目。
  2. 条目将发送给版主批准。
  3. 版主批准帖子,或者返回第 1 项,供作者更正,并附上版主注释。
  4. 完成

每个步骤还应该向操作的接收者发送电子邮件。

由于人机交互因素,我猜测 WF 运行时需要在某个地方序列化自身,这样它就不会丢失状态(因为每个活动都可能被 AppPool 重置、服务器崩溃等中断)。

有谁知道实施类似工作流程的任何好例子或地方?

谢谢大家。

As part of my Personal Improvement Program (PIP™), I'm trying to learn the basics of Windows Workflow Foundation.

I decided to write a fairly simple blogging engine. I know there are tonnes out there, but this is just a playground project I can use for learning some cool stuff. One of the main features I wanted to implement is the moderation of blog entries using WF.
The rest of the project is going to be an ASP.NET MVC app, possibly sprinkled with a little WCF.

From what I've read about WF, I should be using a sequential workflow that should look something like this:

  1. Author adds/ edits blog entry.
  2. Entry gets sent to moderator for approval.
  3. Moderator approves post -- or -- back to item 1. for author to correct, along with moderator notes.
  4. Finish

Every step should also e-mail the receiptiant of the action.

Because of the human interaction factor, I'm guessing the WF runtime would need to serialise itself somewhere so it doesn't loose state (as each activity could be interrupted by AppPool resets, server crashes etc).

Does anyone know of any good examples or places that implement a similar workflow?

Thanks all.

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

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

发布评论

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

评论(4

小…红帽 2024-07-21 06:58:24

我暂时不会深入研究 WW。 .NET 4.0将对WW模型进行更改,以解决当前的痛点。 这些更改将引入一个与当今的 WW 根本不同的模型,如果您还没有适当的 WW 解决方案,那么学习 WW 的当前方法不会有太大帮助。

更多信息可以在这里找到:

http://blogs.msdn.com/endpoint/archive/2009/01/20/the-road-to-wf-4-0-part-1.aspx

I would hold off on delving into WW for the time being. .NET 4.0 is going to introduce changes to the model of WW to address current pain points. These changes will introduce a model that is fundamentally different from WW today, and learning the current methodologies for WW will not be as helpful if you don't already have a WW solution in place.

More information can be found here:

http://blogs.msdn.com/endpoint/archive/2009/01/20/the-road-to-wf-4-0-part-1.aspx

傻比既视感 2024-07-21 06:58:24

你走在正确的轨道上。 Windows Workflow 提供了一个持久性模型,允许您将正在运行的工作流实例的状态保存到 SQL Server。 当正在运行的实例暂停时(通常在等待工作流外部的输入时),状态会自动序列化到数据库。

这里是Microsoft 提供的用于基于 Web 的审批工作流程的入门工具包。

You're on the right track. Windows Workflow provides a persistence model that allows you to save the state of a running workflow instance to a SQL Server. When a running instance is paused (usually while waiting for input from outside the workflow) the state is automatically serialized to the database.

Here is a starter kit from Microsoft for web-based approval workflows.

╄→承喏 2024-07-21 06:58:24

我不确定您想要使用顺序工作流程。 状态机工作流程可能更适合您的需求。 恕我直言,在连续的工作流程中冲洗和重复似乎有点麻烦。

我喜欢 代码颂歌并思考状态机工作流程教程 会回答你的很多问题。

I am not sure you want to use a sequential workflow. A state machine workflow is probably more applicable to your needs. Rinsing and repeating in a sequential workflow always seems a bit cumbersome IMHO.

I like the workflow tutorials on Ode to Code and think the tutorial on state machine workflows will answer a lot of your questions.

甜是你 2024-07-21 06:58:24

在某个地方序列化自己,这样就不会丢失状态

WF对此有内置支持(使用SQL Server,但您可以插入不同的后端)。

任何像样的资源都应该涵盖工作流程持久性(例如“Pro WF”(APress))。

其他书籍(例如“Essential Windows Workflow Foundation”(AW))涵盖了更多“为什么它会这样工作”的内容。 因此,“Pro WF”将使您更快地使用内置(或其他现成的)活动等,但必不可少...可能会让您更好地理解创建自己的活动(特别是在与持久性和故障)。

serialise itself somewhere so it doesn't loose state

WF has inbuilt support for this (using SQL Server, but you can plugin a different backend).

Any decent resource should cover workflow persistence (e.g. "Pro WF" (APress) does).

Other books (e.g. "Essential Windows Workflow Foundation" (AW)) cover more of the "why does it work this way". So "Pro WF" will get you using the inbuilt (or other off the shelf) activities etc. quicker, but Essential... will likely lead to you having a better understanding to create your own Activities (especially when it comes to interacting with persistence and faults).

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