关于工作流程架构的建议?
我们为客户建立了一个资助申请系统。 他们现在要求一些简单的工作流程功能(提交申请之前需要两次批准)。
我对数据库设计进行了一些思考,我将使用该数据库设计以提供最大灵活性和可重用性的方式对工作流需求进行编码,并且我有兴趣知道是否有任何现有的设计模式或最佳实践对于这种类型的系统。 有什么建议么?
注意:这是一个自定义 ASP.NET 应用程序,我们肯定会推出自己的工作流解决方案。 我对购买组件不感兴趣,更不用说将整个东西转移到像 SharePoint 这样的平台上。
We built a grant application system for a client. They've now asked for some simple workflow functionality (two approvals needed before the application is submitted).
I've given some thought to the database design that I'd use to encode the workflow requirements in a way that would offer maximum flexibility and reusability, and I'd be interested to know if there are any existing design patterns or best practices out there for this type of system. Any suggestions?
Note: This is a custom ASP.NET application, and we'll definitely be rolling our own workflow solution. I'm not interested in buying into a component, or much less moving this whole thing to a platform like SharePoint.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不查看 Windows Workflow Foundation 是愚蠢的。 它正是根据您的需求而设计的。
这是ASP.NET 特定链接。
To not look at the Windows Workflow Foundation would be foolish. It was made for exactly what you require.
Here's an ASP.NET specific link.
如果工作流程功能如此简单,那么您的方法就足够了。 但是,如果您想要(或者客户稍后要求)更多功能,例如:
那么您可能需要考虑像 工作流基础。
可以在此处找到工作流模式的学术方法,它们分为四类:
I认为您的案例更有趣的类别是资源模式。
If the workflow functionality is so simple then your approach is enough. But if you want (or if the customer later asks for) more functionality like:
then you may have to consider a workflow component like Workflow Foundation.
An academic approach to workflow patterns can be found here and they are grouped in four categories:
I think that the more interesting category for your case is the Resource Patterns.
过去行之有效的一种解决方案是创建包含成员的审批组,将审批代码作为简单的查找表,并对审批状态机进行软编码,以便每个步骤都是通过将审批代码分配给项目来实现的团体成员。 这允许更改组成员资格和更改批准路径,而无需重新编码任何内容。 您还可以添加代码触发器和端点(通过反射,例如程序集名称+类名称+方法名称)以在每个步骤执行副作用和提交/通知操作
one solution that has worked well in the past is to create approval groups with members, approval codes as a simple lookup table, and soft-code the approval state-machine so that each step results from the assigning of an approval code to an item by a group member. This allows the group membership to change and the approval paths to change without having to re-code anything. You could also add code triggers and endpoints (via reflection, e.g. assembly name + class name + method name) to perform side-effect and commit/notification actions at each step
我有类似的查询。 存在一组相互依赖的批处理过程。 我正在为这些批处理过程开发类似工作流程的系统。
以下两种设计中哪一个更好:
数据库驱动设计,其中每个进程更新其状态和数据库表中的其他详细信息,其他进程查询这些表,或
基于 JMS 或消息传递的方法,其中进程使用消息队列相互通信。
基于
I have a similar query. There is a group of batch processes with interdependencies. I am working on a workflow like system for these batch processes.
Which of the following two designs is better:
Database driven design where each process updates it's status and other details in database tables and other processes query these tables , or
A JMS or messaging based approach where processes communicate with each other using messaging queues.