需要一些有关工作流程设计的想法
我想开始构建一个技术支持应用程序作为个人项目,使用 Windows Workflow Foundation 4 来实现业务流程。我对 WF 和 BP 非常陌生,但这就是我这样做的原因。做了一些研究,我发现状态机工作流程最适合于此,因为它是一个长期运行的过程,需要大量的人工干预。所以基本上我想到的流程是这样的:
- 用户提交一个包含所有信息的表单 所需数据。
- 创建并传递 Ticket 对象 作为工作流程的 InArgument。 该票现在处于待处理状态 状态并等待 ResumeBookmark 当管理员打开票证时致电。
管理员分配(意味着一些 对象属性将是 初始化/修改/等等以及 一些数据库表)的票证 工程师,它进入分配的 状态。等等..
现在我的问题是:除了修改对象属性之外,我无法找到一种方法来增加状态活动流的一定程度的复杂性。我所说的复杂性是指一种利用该技术的方法,因为目前我还没有看到与命令式实现相比的优点。 任何想法都会受到欢迎。提前感谢
I want to start building a technical support application as a personal project, using Windows Workflow Foundation 4 for implementing the business process.I'm very new to WF and BPs but that's why i am doing this. Did some research and I found that a state machine workflow will be best suited for this as it is a long running process with lots of human intervention. So basically the flow I thought of will be like this:
- user submits a form with all the
required data. - a Ticket object is created and passed
in as an InArgument for the workflow.
The ticket is now in the Pending
state and waits for a ResumeBookmark
call when a admin opens the ticket. the admin assigns (meaning that some
of the object properties will be
initialized/modified/etc and also
some db tables) the ticket to a
engineer and it goes into a Assigned
state. And so on..Now my problem is: I can't figure out a way to add some level of complexity of the State activity flow other than modifying the object properties. By complexity I mean a way to make use of this technology, because for now i don't see the upside of this compared to a imperative implementation.
any ideas are well received .thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,我建议您阅读这本书 Pro WF: .NET 4.0 中的 Windows 工作流< /a> 并完成教程(如果您还没有)。虽然它并不完美,但它涵盖了许多重要主题。
对于长时间运行的流程,您几乎肯定会想要实现持久性。否则,如果您的服务器出现故障,正在运行的工作流程就会消失。还可以考虑在 IIS 下托管。
订阅问题解决者并查看他的回答。他还有WF 4 简介视频系列。 第 9 频道 上也有其他人制作的多个视频。
状态机不是现成的;这是一个单独的下载。但这不是必需的 - 您可以使用顺序、流程图或组合来实现您想要的。
准备编写自定义活动。 (参见第 9 频道的视频,尤其是 Leon Welicki 的视频。)如果您的要求包括这些,您将必须实施安全、锁定、工作列表等。 WF 不是一个开箱即用的BPM 系统。
最后,不要被吓倒。这一切都是可行的,而且 WF 4 是一个经过深思熟虑的框架。准备好花费大量时间学习和实施这一点。
First, I'd recommend picking up the book Pro WF: Windows Workflow in .NET 4.0 and working through the tutorials (if you haven't yet). While it's not perfect, it covers many of the important topics.
For a long-running process you're almost certainly going to want to implement persistence. Otherwise if your server goes down, running workflows disappear. Also consider hosting under IIS.
Subscribe to The Problem Solver and check out his answers on SO. He also has an Introduction to WF 4 video series. There are several videos by others on Channel 9, too.
State Machine doesn't come out of the box; it's a separate download. It's not required, though - you could use Sequential, Flowchart, or a combination to achieve what you want.
Be prepared to write custom activities. (See the Channel 9 videos, especially Leon Welicki's.) You'll have to implement security, locking, worklists, etc. if those are part of your requirements. WF is not a BPM system out of the box.
Finally, don't be intimidated. This is all doable, and WF 4 is a well-thought-out framework. Just be prepared to spend considerable time learning and implementing this.
我发现这个工作示例对于在 WCF 下托管 WF4 服务很有用。它还涵盖了您可以进一步探索的许多关键概念:
http://programming4.us/Enterprise/332。 ASPX
I found this worked example useful for hosting a WF4 service under WCF. It also covers a number of key concepts you can explore further:
http://programming4.us/Enterprise/332.aspx