WCF 请求如何与多个工作流实例关联?

发布于 2024-11-15 22:45:27 字数 400 浏览 3 评论 0原文

场景如下:

我有多个客户端,它们可以使用 WCF 请求在工作流服务器上注册自己,以接收某种通知。将使用另一个接收活动从外部系统接收通知信息。然后,工作流应该获取通知信息并使用发送活动和回调相关性回调所有注册的客户端(客户端公开其中实现的回调接口以及最初随注册请求传递的端点地址)。 “日志运行工作流服务”方法与持久存储一起使用。

现在,我正在寻找某种方法将从外部系统收到的通知的传入信息与先前在注册请求时创建的持久工作流实例相关联,以便所有客户端都将使用已通过的端点收到通知注册请求。当收到通知信息时,WF 4.0 是否能够恢复并执行多个工作流实例,而无需以某种方式手动存储端点并遍历它们?如果是,我该怎么做?

另外,如果我这样做的方法不正确,那么请建议我有关使用 WCF 服务构建此类系统的最佳实践。

非常感谢您的帮助。

The scenario is a follow:

I have multiple clients in which they can register themselves on a workflow server, using WCF requests, to receive some kind of notifications. The information of the notifications will be received from an external system using another receive activity. The workflow then should get the notification information and callback all registered clients using send activity and callback correlations (the clients are exposing callback interfaces implemented in there and the end-point addresses passed initially with the registration requests). "Log-running workflow service" approach is used with a persistent storage.

Now, I'm looking for some way to correlate the incoming information of the notifications received from the external system with the persisted workflow instances created previously when the registration requests, so that all clients will be notified using end-points that already passed with the registration requests. Is WF 4.0 capable of resuming and executing multiple workflow instances when the information of the notification received without storing end-points somehow manually and go though them? If yes, how can I do that?

Also, if my approach of doing so is not correct, then please advice me about the best practice of doing such system using WCF services.

Your help is highly appreciated.

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

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

发布评论

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

评论(1

兮子 2024-11-22 22:45:27

当您将请求关联与工作流服务结合使用时,关联键必须始终与单个工作流实例匹配,您不能让多个工作流实例对单个消息做出反应。因此,您要么需要使用所有不同的相关键来多播消息,要么以其他方式恢复工作流实例。另一种方法可能是将请求存储在某个地方,例如 SQL 表,并让工作流定期检查该位置(如果需要通知客户端)。

When you use request correlation with workflow services the correlation key must always match a single workflow instance, you can't have multiple workflow instances react to a single message. So you either need to multicast the message using all the different correlation keys or resume you workflow instances in some other way. That other way could be to store the request somewhere, like a SQL table, and have the workflows periodically check that location if they need to notify the client.

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