Question

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?

WF template -- Operation name left intentionally blank

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top