Workflow Services ReceiveAndSendReply Unordered Calls Timeout

╄→гoц情女王★ 提交于 2019-11-30 19:29:58

问题


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

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.

Throw Timeout:

Working:

Thanks, - Ronald


回答1:


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.

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.



来源:https://stackoverflow.com/questions/3541703/workflow-services-receiveandsendreply-unordered-calls-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!