开发者

Behaviour of SendResponse in WF4

at the top of my template workflow I put a ReceiveRequest / SendReply block where I'd like to perform synchronous operations, enabling then the user client开发者_开发问答 to receive a timely response of the workflow being started. Client calls the WF via WCF.

Client knows about the status of the current request with status of an entry on my application database.

For example, I create an order, call a PlaceOrderWF, set the status of the order on DB to "Accepted". The client can then perform whatever he wants while the WF is doing checks, controls, etc, ..., setting the final value of the order to "Completed" or "Error".

I expect that the client will receive response just after the SendResponse block. Actually it doesn't seem to work this way, but it waits for some kind of "event" to release the client. Unfortunately, I have no evidence of events triggering this behaviour.

To test it, just put a Delay activity after the SendResponde activity and you should be able to reproduce the behaviour I am talking about.

Any hints on how to avoid this unwanted error?

Behaviour of SendResponse in WF4


The workflow will continue and execute as much as it can on the current thread and as a result doesn't return to the caller right away.If you add a Delay with a small timeout, say 1 second, to the workflow this will cause the workflow to go idle and the WCF response to be send to the client after which the workflow will continue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜