ASP.Net Web 应用程序的工作流程设计建议?

发布于 10-26 23:50 字数 389 浏览 6 评论 0原文

我的团队的任务是设计一个工作流驱动的 Web 应用程序。我需要一些有关设计的建议。

工作流程需要是动态的。这意味着,用户可以通过某些界面定义工作流并将这些工作流应用到给定的场景(定义将存在于 SQL 2008 数据库中)。场景由业务定义,永远不会改变。因此,可能只能为两种类型的场景定义工作流。工作流程不一定是线性的。某种状态将驱动工作流程。状态也将是动态的,但仅存在于工作流程中。

我一直在研究工作流程和状态机的示例,我的头在旋转。我不确定我是否想要利用 Workflow Foundation 或我们开发的东西。我已经看到 this 并认为它可能有效,但我不确定状态完整实施是否适合我们。

My team has been tasked with designing a web application that is workflow driven. I need some advice regarding the design.

The workflows need to be dynamic. Meaning, users can define the workflows through some interface and apply those workflows to a given scenario (The definitions will live in a SQL 2008 Database). The scenarios are defined by the business and will never change. So there may be only 2 types of scenarios a workflow can be defined for. The workflows are not necessarily linear. Some sort of state will drive the workflow. States will also be dynamic, but only exist in a workflow.

I have been looking at examples of workflows and state machines and my head is spinning. I am not sure I want o leverage Workflow Foundation or something we develop. I have seen this and think it may work, but I am not sure the state full implementation will work for us.

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

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

发布评论

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

评论(1

叹沉浮2024-11-02 23:50:15

您可以使用 WF4 来完成此操作。我从未使用过 Objectflow,所以我无法对此发表评论,但它似乎是一个内存中解决方案,并且 ASP.NET 网站托管在 IIS 中,这意味着您偶尔会在 IIS 回收和 AppDomain 时丢失状态。通常这不是一个大问题,因为它不会经常发生,但 WF4 InstanceStore 会解决这个问题。它还允许您在没有粘性会话的网络场上运行,并使工作流程从一台机器迁移到另一台机器。

另一个好东西是工作流程设计器。它是一个 WPF 控件,您可以在自己的应用程序中重新托管。不是在 ASP.NET 或 Silverlight 应用程序中,但您可以提供一个智能客户端,让用户使用您在 VS2010 中使用的理智设计器来更新工作流定义。

WF4 的最大问题是异步执行本质。您将需要使用 SynchronizationContext 来执行活动,并等待工作流在新状态下空闲,然后再将生成的 HTML 返回到浏览器。

You can do this using WF4. I have never used Objectflow so I can't really comment on that but it appears to be an in memory solution and with an ASP.NET web site hosted in IIS that means you will occasionally lose state as IIS recycles and AppDomain. Usually not a big problem as it doesn't happen often but a WF4 InstanceStore will take care of that. It will also allow you to run on a web farm without sticky sessions and have the workflow migrate from machine to machine.

Another nice thing is the workflow designer. Its a WPF control you can rehost in your own app. Not in am ASP.NET or Silverlight app but you can provide a smart client to have users update the workflow definition using the sane designer as you use in VS2010.

The biggest problem with WF4 is the asynchronous execution nature. You will need to use a SynchronizationContext to execute the activities and wait for the workflow to go idle in the new state before you return the resulting HTML to the browser.

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