工作流服务 ReceiveAndSendReply 无序调用超时 [英] Workflow Services ReceiveAndSendReply Unordered Calls Timeout

查看:28
本文介绍了工作流服务 ReceiveAndSendReply 无序调用超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个示例工作流服务.我在无序调用它时遇到问题.下面的所有接收活动都具有相同的相关性.当工作流在 GetData() 上启动并且客户端尝试调用第 4 个或第 3 个接收活动时,它会导致超时.我原以为会退回

I created a sample Workflow Service. I am having a problem calling it in unordered. All the receive activity below having same correlation. When the workflow starts on GetData() and the client tries to call 4th or 3rd receive activity it results to timeout. I was expecting to throws back a

操作'第四|{http://tempuri.org/}IService'在带有标识符的服务实例上'04e7f5aa-5e01-47ac-8a6e-b20492c5ac19'此时无法执行.请确保操作正常以正确的顺序执行并且使用中的绑定提供订购的交货保证.

Operation 'Fourth|{http://tempuri.org/}IService' on service instance with identifier '04e7f5aa-5e01-47ac-8a6e-b20492c5ac19' cannot be performed at this time. Please ensure that the operations are performed in the correct order and that the binding in use provides ordered delivery guarantees.

但是当我移出第二个接收活动并删除包含延迟的选择时,它工作正常并抛出预期结果.

But when I moved out the second receive activity and delete the pick including the delay, it works fine and throw the expected result.

抛出超时:

工作:

谢谢,- 罗纳德

推荐答案

该问题是由在结合使用 Receive 和 Delay 活动时处理消息的方式出现问题引起的.基本上,只要您开始向混合中添加延迟活动,工作流调度程序就会保留它无法处理的任何传入 WCF 消息,因为它假定延迟到期时它可能能够处理.在这些情况下,不完全是您正在寻找的行为,但事实就是如此.

The problem is caused by an issue in the way messages are handled when a combination of Receive and Delay activities are used. Basically as soon as you start adding a delay activity to the mix the workflow scheduler holds on to any incoming WCF message it can't handle because it assumes it might be able to when the Delay expires. Not exactly the behavior you are looking for in these cases but that is the way it is.

目前最好的解决方法是不使用 Delay 活动,而是使用 Receive 活动以及一些在过期时发送超时请求的外部服务.

The best workaround for now is not to use the Delay activity but instead a Receive activity with some external service that sends the timeout request when expired.

这篇关于工作流服务 ReceiveAndSendReply 无序调用超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆