Search

Search:

Namespace:

Search Result
.
See
.
Summary
DefaultWorkflowSchedulerService creates and manages the threads that run workflow instances.
.

DefaultWorkflowSchedulerService creates and manages the threads that run workflow instances in an asynchronous manner on the workflow runtime engine and includes default support for having multiple workflow instances queued in the runtime thread pool. If no other workflow scheduler service instance is added to WorkflowRuntime, it uses the DefaultWorkflowSchedulerService by default.

.

See also: ManualWorkflowSchedulerService

.

Depending on the object used to call GetService a number of RuntimeServices might not be returned, a null/Nothing is returned instead. This is the case with a ActivityExecutionContext which will not return any of the following: WorkflowSchedulerService, WorkflowPersistenceService, TrackingService, WorkflowCommitWorkBatchService, WorkflowLoaderService or the WorkflowRuntime itself.

.
            <add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, 
.
Summary
ManualWorkflowSchedulerService is used for synchronous execution of workflow instances.
.

ManualWorkflowSchedulerService is used for synchronous execution of workflow instances. If this service is being used, the workflow instances are executed on the calling thread from the host application, thus blocking the execution of the host application until the workflow instance becomes idle.

.

When using ManualWorkflowSchedulerService in an WebService environment with the DelayActivity you need to set the UseActiveTimers of the ManualWorkflowSchedulerService to true and make sure the ASP.NET process is reloaded when IIS unloads it.

.

If you want to use the ManualWorkflowSchedulerService without the UseActiveTimers you are responsible for restarting a workflow after the DelayActivity has expired. To do so you need some kind of periodic event like a timer. The following example uses a Timer but as that is what the UseActiveTimers option actually does it is just an example of the sort of code you need to write.

.
        ManualWorkflowSchedulerService scheduler = new ManualWorkflowSchedulerService();
.
        ManualWorkflowSchedulerService scheduler = workflowRuntime.GetService<ManualWorkflowSchedulerService>();
.

See also: DefaultWorkflowSchedulerService

.

Collection of objects that actually do most of the work in WF. There are some required services that are always present, if the developer add one that is used otherwise a default is used. For example the DefaultWorkflowSchedulerService is the default implementation of the rquired WorkflowSchedulerService. Some other RuntimeServices are optional but provided out of the box like the SqlWorkflowPersistenceService. If not provided there is no default and this functionality is unavailable. The third kind of RuntimeServices is the custom RuntimeServices usually developed in combination with a custom workflow Activity. These services can use the WorkflowRuntimeService as a base class although this is not required and they can derive from another class is so desired. Use the WorkflowRuntime AddService function to configure the WorkflowRuntime.

.
  • WorkflowSchedulerService
.

Workflow Scheduler Services manage how workflow instances are scheduled by the workflow runtime engine, whether they are handled in an asynchronous or a manual synchronous mode. WF provides two out-of-box implementations for the WorkflowSchedulerService: DefaultWorkflowSchedulerService and ManualWorkflowSchedulerService.

.

The WF runtime engine requires a workflow transaction service. By default, it uses the DefaultWorkflowCommitWorkBatchService. The host application can choose to replace the DefaultWorkflowSchedulerService with SharedConnectionDefaultWorkflowCommitWorkBatchService or with a custom service.