WWF 服务 - 如何使服务异步?

发布于 2024-12-19 06:37:49 字数 198 浏览 3 评论 0原文

我想创建一个服务,它接收来自客户端的请求,将请求添加到数据库,然后调用另一个 WWF 服务 ASYNCRONOUS,该服务对数据库中的数据执行一些耗时的工作。

如何使 Windows Workflow 服务中的服务同步? 我使用第二个 Windows 工作流服务作为队列(因为它只能是该服务的一个实例=我将 canCreateInstance 设置为 false)。

I want to create a service which receives a request from the client, adds the request to a database and than calls another WWF service ASYNCRONOUS which does some time consuming job withthe data from the database.

How do I make a service to be asincronous in Windows Workflow service?
I use the second Windows Workflow service as a queue(as it can only be one instance of this service=I set canCreateInstance to false).

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

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

发布评论

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

评论(1

樱花细雨 2024-12-26 06:37:49

要使工作流服务以异步方式运行,请使用不带相关 SendReply 的 Receive 活动创建单向协定。

当另一个工作流(或 WCF 客户端代理)调用此服务时,它不会等待该服务的回复。

至于您仅对一项服务的一个实例的评论,您错了。无法拥有单例工作流服务(与 WCF 服务一样),并且 CanCreateInstance 对此行为没有影响。

To make a Workflow Service behave asynchronously create a One Way contract by using a Receive activity without a correlated SendReply.

When another Workflow (or WCF client proxy) calls this service it will not wait for a reply from the service.

As for your comment about only one instance of a service you are mistaken. There is no way to have a singleton workflow service (as there is with WCF services) and CanCreateInstance has no effect on this behavior.

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