DefaultWorkflowSchedulerService Constructors

Definition

Initializes a new instance of the DefaultWorkflowSchedulerService class.

Overloads

DefaultWorkflowSchedulerService()

Initializes a new instance of the DefaultWorkflowSchedulerService class.

DefaultWorkflowSchedulerService(NameValueCollection)

Initializes a new instance of the DefaultWorkflowSchedulerService class.

DefaultWorkflowSchedulerService(Int32)

Initializes a new instance of the DefaultWorkflowSchedulerService class by using the specified maximum number of workflow instances that the service can run simultaneously.

DefaultWorkflowSchedulerService()

Initializes a new instance of the DefaultWorkflowSchedulerService class.

public:
 DefaultWorkflowSchedulerService();
public DefaultWorkflowSchedulerService ();
Public Sub New ()

DefaultWorkflowSchedulerService(NameValueCollection)

Initializes a new instance of the DefaultWorkflowSchedulerService class.

public:
 DefaultWorkflowSchedulerService(System::Collections::Specialized::NameValueCollection ^ parameters);
public DefaultWorkflowSchedulerService (System.Collections.Specialized.NameValueCollection parameters);
new System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService : System.Collections.Specialized.NameValueCollection -> System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService
Public Sub New (parameters As NameValueCollection)

Parameters

parameters
NameValueCollection

A NameValueCollection that holds initialization information.

Exceptions

parameters contains a null reference (Nothing in Visual Basic).

One of the key values in the parameters collection contains a null reference (Nothing).

-or-

One of the key values in the parameters collection does not match the default key for DefaultWorkflowSchedulerService.

One of the parameters cannot be converted to a double-precision floating point number that matches MaxSimultaneousWorkflows.

Remarks

This constructor is invoked when the workflow runtime engine loads services from an application configuration file. The only valid parameter is maxSimultaneousWorkflows, which can specify the number of workflows that can be run at the same time.

Setting maxSimultaneousWorkflows to a high value might cause the .NET thread pool to starve. This could cause time-outs when a persistence service tries to complete a persistence transaction because Transaction objects also use the .NET thread pool.

If not specified in a constructor or configuration file, the default value for maxSimultaneousWorkflows is 5 for a single-processor machine, and (int)(5 * Environment.ProcessorCount * .8) for a multiple-processor machine. Note that (int)(5 * Environment.ProcessorCount * .8) is not always the same as (int)(4 * Environment.ProcessorCount), because of the rules of integer arithmetic.

DefaultWorkflowSchedulerService(Int32)

Initializes a new instance of the DefaultWorkflowSchedulerService class by using the specified maximum number of workflow instances that the service can run simultaneously.

public:
 DefaultWorkflowSchedulerService(int maxSimultaneousWorkflows);
public DefaultWorkflowSchedulerService (int maxSimultaneousWorkflows);
new System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService : int -> System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService
Public Sub New (maxSimultaneousWorkflows As Integer)

Parameters

maxSimultaneousWorkflows
Int32

An integer that determines the maximum number of workflow instances that can be stored in the thread pool queue.

Exceptions

maxSimultaneousWorkflows is less than 1.

Remarks

Setting maxSimultaneousWorkflows to a high value might cause the .NET thread pool to starve. This could cause time-outs when a persistence service tries to complete a persistence transaction because Transaction objects also use the .NET thread pool.

If not specified in a constructor or configuration file, the default value for maxSimultaneousWorkflows is 5 for a single-processor machine, and (int)(5 * Environment.ProcessorCount * .8) for a multiple-processor machine. Note that (int)(5 * Environment.ProcessorCount * .8) is not always the same as (int)(4 * Environment.ProcessorCount), because of the rules of integer arithmetic.

Applies to