Share via


ManualWorkflowSchedulerService+Delay Activity

By default, the ManualWorkflowSchedulerService is used without active timers. So when the delay is hit, the workflow yields the thread back to the scheduler, and when the delay expires, nobody is around to call RunWorkflow. If you look in the web.config for the service you should see the entry for the scheduler service and you can add in the UseActiveTimers=true which will cause the workflow to resume when the delay expires

Example:

<add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" useActiveTimers="true"/>

 

useActiveTimers:

Boolean that determines how delay activities are handled. If true, the scheduler service automatically resumes workflows after delay activities expire (by using an in-memory timer). If false, the host must manually resume the workflow after the delay activities expire.

Comments

  • Anonymous
    July 24, 2008
    PingBack from http://blog.a-foton.ru/2008/07/manualworkflowschedulerservicedelay-activity/

  • Anonymous
    May 26, 2009
    hi, can you explain the importance in detail and where exactly I should add this Tag in Web.config file? Thanks,

  • Anonymous
    July 31, 2009
    PROBLEM: ========= Delay activity has issues when the workflow is exposed as web service. The time out duration of 0 works just great. If we put the time duration as 1 second or greater, the web service just hangs. CAUSE/SOLUTION: =============== By Default WebService workflows use the ManualWorkflowSchedulerService without active timers. So when the delay is hit, the workflow yields the thread back to the scheduler, and when the delay expires, nobody is around to call RunWorkflow. If you look in the web.config for the service you should see the entry for the scheduler service and you can add in the UseActiveTimers=true which will cause the workflow to resume when the delay expires. Have the entry in web.config as follows and it fixes the issue: <add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" useActiveTimers="true"/>