Web service output only happens when instance idles

Hi,
I have a workflow using the default WebServiceOutputActivity and hosted using the ManualScheduler service.
I expected the web service output to be sent when the workflow executes the output activity. However, the runtime continues to execute the workflow until it idles and only then sends the response to the caller.
Is this expected behaviour If so, why not send the response and then continue to execute the remaining activities
Is there any workaround to force the response to happen sooner

Thanks
--
Nuno


Answer this question

Web service output only happens when instance idles

  • Alexey Rokhin

    Nuno,

    That is how the manual workflow scheduler works. There is a single thread being used by the scheduler and it returns control to your service when the workflow idles. You can cause an idle in your worklfow and then use the response and ask the scheduler to run some more.

    Matt



  • Wicket

    Thanks for your answer Matt.

    I understand that the manual workflow scheduler works that way.
    What I don't understand is way the web service output activity doesn't flush its output when it's run, if it did the web service's client would be free to continue processing and the workflow could go on using the same thread to do the remaining processing.

    Adding delays to the wf is not an option, we're using state workflows and to make it idle after handling a web service method we would need to create new states just for that because the delay must be the event's first activity, making the workflows much more complex.

    --
    Nuno


  • Jeff54

    I feared the only way would be to forget using the built-in web service support, that's why I posted here hoping that someone had a workaround.

    Thanks anyway
    --
    Nuno


  • James Alexander

    but the workflow is using THE thread that your web service request is executing on, so the web service code itself does not even gain control back before the workflow idles. There is no easy way to return data back to the client or work with it in the web service code while the workflow is using the request thread.

    I agree that adding in that code in your case will be messy, especially with a state machine. You may want to look at using some custom code for doing the web service interaction instead of using the built in support.

    Matt



  • Web service output only happens when instance idles