WWF 服务 - 如何使服务异步?
我想创建一个服务,它接收来自客户端的请求,将请求添加到数据库,然后调用另一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要使工作流服务以异步方式运行,请使用不带相关 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.