开发者

Human activity support in Windows Workflow 4

开发者 https://www.devze.com 2023-01-25 01:25 出处:网络
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 auth开发者_如

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 auth开发者_如何学运维orization).

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
  • Workflow 2
    • Activity C, correlated on workItemId
      • Rights for: Bill

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:

  1. Is any of this functionality in WF 4? If so, what is it called?
  2. If not, is there an Open Source project that adds any of this functionality to WF 4?
  3. 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.


Okay let's start with the simple awnsers.

  1. No there is no direct support for this in the box
  2. As far as I am aware there is no OS project offering this functionality.
  3. Not that I am aware of, but then I have to admit I wasn't aware of this article either.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消