views:

62

answers:

1

Hi,

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:

_http://img816.imageshack.us/img816/8344/receivetimeout.jpg

Working

_http://img843.imageshack.us/img843/2371/receiveworking.jpg

Thanks, - Ronald

A: 

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.

Maurice