MADHU@MICROSOFT BLOG

All About Distributed apps

ManualWorkflowSchedulerService+Delay Activity

ManualWorkflowSchedulerService+Delay Activity

  • Comments 3

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.

Leave a Comment
  • Please add 4 and 1 and type the answer here:
  • Post
  • PingBack from http://blog.a-foton.ru/2008/07/manualworkflowschedulerservicedelay-activity/

  • hi,

    can you explain the importance in detail and where exactly I should add this Tag in Web.config file?

    Thanks,

  • 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"/>

Page 1 of 1 (3 items)