index > Windows Workflow Foundation > Web service output only happens when instance idles

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
NMF

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




See What You Can Learn -- http://www.pluralsight.com/courses/IntroducingWF.aspx
Matt Milner - Pluralsight
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

NMF

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




See What You Can Learn -- http://www.pluralsight.com/courses/IntroducingWF.aspx
Matt Milner - Pluralsight
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

NMF
reply 5

You can use google to search for other answers

 

More Articles

• How to call & pass the parameter to a workflow inside a workf...
• Custom SqlPersistenceService
• WWF Scalabilty
• State Machine in Web Service
• Share large data between workflow and application
• EventSink ... Where it is?
• Tips For Resolving WWF Build Errors - Beta 1
• Changing the color property of an activity
• Statemashine workflow - handleExternalEventActivity
• Problems passing parameters to CallExternalMethodActivity
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• About draw connector line on desinger
• Support for multithreading workflows?
• About UITypeEditor
• Where can I host the runtime in a SOA ba
• The referenced component 'Outlook' could
• CPU Usage more then 50% all the time!
• Windows Workflow Foundation Technology F
• FileNotFoundException in GetWorkflowDefi
• Questions about my ASP.NET scenario
• Why can't I inherit from InvokeWebServic
• end-user workflow design & compilation
• How to obtain Parent Activity , reading
• Usings Custom Activities
• Lotus workflow
• use of Activity.Save( ) method?

Hot Articles

• Migrating to WWF Beta2
• Workflow Communicating back to a particu
• using External Service with the Custom A
• PROBLEM with HttpContext.Current
• Exception has been thrown by the target
• ManualWorkflowSchedulerService and Web S
• Configuring ActiveDirectoryRoleFactory t
• Issue loading & resuming an unloaded
• eventsink activity??
• SqlTrackingService - Events not tracked
• UnloadOnIdle no longer works in Web.Conf
• simple question
• Debug step into code behind SharePoint S
• Workflows and Web Services Question
• ftp in activity

Recommend Articles

• workFlowcontext variables
• tracking when exception occurs
• Spawn new workflows from within a workflow
• SqlPersistance, WWF Beta 2.2, and ASP.NET
• Problems migrating a TrackingService imp
• InvokeWorkflow
• How to get a value from the dependencypr
• Error occurred while Loading Workflow
• Deserialization in while loop
• How can invoke workflow in ASP.NET
• StateMachine WorkWlow
• SqlTrackingQuery comments and questions
• A question for state machine workflow
• Replicator Use In State Machine State Ac
• Beta1->Beta2 changes / Activity prope