Export (0) Print
Expand All

WorkflowRuntime Class

Note: This API is now obsolete.

Represents the configurable execution environment provided by the workflow run-time engine for workflows.

System.Object
  System.Workflow.Runtime.WorkflowRuntime

Namespace:  System.Workflow.Runtime
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

[<ObsoleteAttribute("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type WorkflowRuntime =  
    class 
        interface IServiceProvider 
        interface IDisposable 
    end

The WorkflowRuntime type exposes the following members.

  NameDescription
Public methodWorkflowRuntime()Initializes a new instance of the WorkflowRuntime class.
Public methodWorkflowRuntime(String)Initializes a new instance of the WorkflowRuntime class by using the specified section of the application configuration file.
Public methodWorkflowRuntime(WorkflowRuntimeSection)Initializes a new instance of the WorkflowRuntime class by using the settings in the specified WorkflowRuntimeSection.
Top

  NameDescription
Public propertyIsStartedGets a value that indicates whether the workflow run-time engine has been started.
Public propertyNameGets or sets the name associated with the WorkflowRuntime.
Top

  NameDescription
Public methodAddServiceAdds the specified service to the workflow run-time engine.
Public methodCreateWorkflow(Type)Creates a new workflow instance by using the specified workflow Type.
Public methodCreateWorkflow(XmlReader)Creates a workflow instance by using the specified XmlReader.
Public methodCreateWorkflow(Type, Dictionary(String, Object))Creates a workflow instance by using the specified workflow Type and the arguments to the workflow contained in the specified Dictionary(TKey, TValue).
Public methodCreateWorkflow(Type, Dictionary(String, Object), Guid)Creates a workflow instance by using the specified parameters.
Public methodCreateWorkflow(XmlReader, XmlReader, Dictionary(String, Object))Creates a workflow instance by using the specified XmlReader objects and the arguments contained in the specified Dictionary(TKey, TValue).
Public methodCreateWorkflow(XmlReader, XmlReader, Dictionary(String, Object), Guid)Creates a workflow instance by using the specified parameters.
Public methodDisposeReleases the resources used by the WorkflowRuntime.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAllServices(Type)Retrieves all the services that are added to the workflow run-time engine that implement or derive from the specified Type.
Public methodGetAllServices(T)()Retrieves all the services that are added to the workflow run-time engine that implement or derive from the specified generic type.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLoadedWorkflowsGets a collection that contains all the workflow instances currently loaded in memory.
Public methodGetService(Type)Retrieves a service of the specified Type from the workflow run-time engine.
Public methodGetService(T)()Retrieves a service of the specified generic type from the workflow run-time engine.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetWorkflowRetrieves the workflow instance that has the specified Guid.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveServiceRemoves the specified service from the workflow run-time engine.
Public methodStartRuntimeStarts the workflow run-time engine and the workflow run-time engine services.
Public methodStopRuntimeStops the workflow run-time engine and the run-time services.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public eventServicesExceptionNotHandledOccurs when a service that is derived from the WorkflowRuntimeService class calls RaiseServicesExceptionNotHandledEvent.
Public eventStartedOccurs when the workflow run-time engine is started.
Public eventStoppedOccurs when the workflow run-time engine is stopped.
Public eventWorkflowAbortedOccurs when a workflow instance is aborted.
Public eventWorkflowCompletedOccurs when a workflow instance has completed.
Public eventWorkflowCreatedOccurs when a workflow instance is created.
Public eventWorkflowIdledOccurs when a workflow instance enters the idle state.
Public eventWorkflowLoadedOccurs when the workflow instance is loaded into memory.
Public eventWorkflowPersistedOccurs when the state of a workflow instance is persisted.
Public eventWorkflowResumedOccurs when execution of a workflow instance is resumed following a suspension.
Public eventWorkflowStartedOccurs when a workflow instance has been started.
Public eventWorkflowSuspendedOccurs when a workflow instance is suspended.
Public eventWorkflowTerminatedOccurs when a workflow instance is terminated.
Public eventWorkflowUnloadedOccurs when the workflow instance is unloaded from memory.
Top

NoteNote

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

WorkflowRuntime exposes functionality required by a host application and services to configure and control the workflow run-time engine and to be notified of changes to both the workflow run-time engine and any of its workflow instances.

The following code example demonstrates how to use WorkflowRuntime functionality from a workflow host. It provides examples of how to use the WorkflowRuntime constructor and the AddService, StartRuntime, and StopRuntime methods. The code also shows the recommended way to create a WorkflowInstance object in a workflow host using the CreateWorkflow method. It also shows how to set event handlers for the WorkflowCompleted, WorkflowIdled, and WorkflowTerminated events.

This code example is part of the Canceling a Workflow sample.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0
Obsolete (compiler warning) in 4.5.2
Obsolete (compiler warning) in 4.5.1
Obsolete (compiler warning) in 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

This type is thread safe.

Show:
© 2014 Microsoft