Search code examples
workflow-foundation-4

Return to the client from within a service call, but continue executing the workflow?


I have a WF 4 service. I have the following sequence:

  1. Receive activity
  2. Some Other activities
  3. SendReply
  4. Other Activities

I have an asp.net calling this service. Why does this client has to wait for all steps to complete? I want that when step 3 is completed, the reply is sent to the client and the client can continue on its own.

any assistance would be greatly appreciated.


Solution

  • The response is ready to send but due to the async nature of WF4 it isn't actually send directly. You can either persist the workflow, using the PersistBeforeSend, or add a small sub second delay using a Delay activity.