Windows Workflow 4 中的人类活动支持
我正在研究 .NET 4.0 的 Windows 工作流 (WF),似乎缺少一些内容。从 BPM 的角度来看,您希望拥有工作队列和安全性(用户授权)的概念。
例如,假设您有多个长时间运行的工作流实例,这些实例来自在应用程序服务器(例如 AppFabric)上运行的多个不同工作流。多个实例正在活动中等待来自客户端的调用(可能是具有基于内容关联的 WCF 接收)。客户端需要能够查询服务器以确定哪些工作流实例(来自任何工作流)正在等待来自它们的输入。这必须在活动级别基于权限(最好使用 Active Directory 服务)。
例如:
- 工作流程1
- 活动 A,与 orderId 相关
- 权利:Abby、Bill
- 活动 B,与 orderId 相关
- 权利:Abby
- 活动 A,与 orderId 相关
- Workflow 2
- 活动 C,与 workItemId 相关
- 权利:比尔
- 活动 C,与 workItemId 相关
工作流程 1 有 3 个实例正在运行,其中两个在活动 A(订单 123 和 456)中,一个在活动 B(订单 789)中。
工作流 2 有 1 个实例在活动 C 上运行(工作项 99)。
Bill 查询服务器并看到:
Workflow Activity Key 1 A orderId=123 1 A orderId=456 2 C workItemId=99
Abby 查询服务器并看到:
Workflow Activity Key 1 A orderId=123 1 A orderId=456 1 B orderId=789
本文 讨论从头开始为 WF 3.x 编写功能(支持人类活动)。
问题:
- WF 4 中有此功能吗?如果是的话,它叫什么?
- 如果没有,是否有一个开源项目可以将这些功能添加到 WF 4 中?
- 如果没有,是否有比上述文章更多的最新实施指南?
注意:如果可以避免的话,我宁愿不将该解决方案耦合到 SharePoint。
I’m investigating Windows Workflow (WF) for .NET 4.0, and there seems to be a few pieces missing. From a BPM perspective, you want to have the concepts of work queues and security (user authorization).
For instance, say you have multiple long-running workflow instances from several different workflows running on an application server (such as AppFabric). Several of the instances are waiting at an activity for a call from a client (perhaps a WCF Receive with content-based correlation). Clients need to be able to query the server to determine which workflow instances (from any workflow) are waiting for input from them. This has to be rights-based (preferably using Active Directory Services) at the activity level.
For example:
- Workflow 1
- Activity A, correlated on orderId
- Rights for: Abby, Bill
- Activity B, correlated on orderId
- Rights for: Abby
- Activity A, correlated on orderId
- Workflow 2
- Activity C, correlated on workItemId
- Rights for: Bill
- Activity C, correlated on workItemId
Workflow 1 has 3 instances running, two at Activity A (orders 123 and 456) and one at Activity B (order 789).
Workflow 2 has 1 instance running at Activity C (work item 99).
Bill queries the server and sees:
Workflow Activity Key 1 A orderId=123 1 A orderId=456 2 C workItemId=99
Abby queries the server and sees:
Workflow Activity Key 1 A orderId=123 1 A orderId=456 1 B orderId=789
This article discusses writing the functionality (support for human activities) from scratch for WF 3.x.
Questions:
- Is any of this functionality in WF 4? If so, what is it called?
- If not, is there an Open Source project that adds any of this functionality to WF 4?
- If not, are there more up-to-date guidelines to implementing it than the article mentioned above?
Note: I’d rather not couple the solution to SharePoint if I can avoid it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,让我们从简单的遮阳篷开始。
坏消息到目前为止。
假设你想写这样的东西,但是有一些基本的构建块。如果您使用 SqlWorkflowInstanceStore,您将获得一列,其中包含给定工作流的当前书签。这将告诉您当前给定工作流程中哪些接收活动处于活动状态。
SqlWorkflowInstanceStore 中还有属性提升的概念,它允许您提取并查询工作流变量,例如示例中的 orderId。另一件需要注册的事情是启动工作流程的人,因为某些操作通常只有发起者才允许。
将这些与自定义表结合起来,其中每个工作流和安全规则都具有安全规则。 WCF 操作,我认为您已经顺利完成了基本实现。
Okay let's start with the simple awnsers.
So far for the bad news.
Suppose you want to write something like this there are some basic building blocks in place however. If you use the SqlWorkflowInstanceStore you will get a column containing the current bookmarks for a given workflow. This will tell you which Receive activities are active in a given workflow at the moment.
There is also the concept of property promotion in the SqlWorkflowInstanceStore that will allow you to extract, and thus query on, workflow variables like the orderId in your example. Another thing to register is the person who started the workflow as quite often certain actions are only allowed by the originator.
Couple these with a custom table with security rules per workflow & WCF operation and I should think you are well on your way to a basic implementation here.