WorkflowRuntime WorkflowRuntime WorkflowRuntime WorkflowRuntime Class

정의

경고

이 API는 현재 사용되지 않습니다.

워크플로 런타임 엔진이 워크플로에 대해 제공하는 구성 가능한 실행 환경을 나타냅니다.Represents the configurable execution environment provided by the workflow run-time engine for workflows.

public ref class WorkflowRuntime : IDisposable, IServiceProvider
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class WorkflowRuntime : IDisposable, IServiceProvider
type WorkflowRuntime = class
    interface IServiceProvider
    interface IDisposable
Public Class WorkflowRuntime
Implements IDisposable, IServiceProvider
상속
WorkflowRuntimeWorkflowRuntimeWorkflowRuntimeWorkflowRuntime
특성
구현

예제

다음 코드 예제에서는 워크플로 호스트에서 WorkflowRuntime 기능을 사용하는 방법을 보여 줍니다.The following code example demonstrates how to use WorkflowRuntime functionality from a workflow host. WorkflowRuntime 생성자와 AddService, StartRuntimeStopRuntime 메서드를 사용하는 방법의 예제를 제공합니다.It provides examples of how to use the WorkflowRuntime constructor and the AddService, StartRuntime, and StopRuntime methods. 또한 이 코드에서는 WorkflowInstance 메서드를 사용하여 워크플로 호스트에 CreateWorkflow 개체를 만드는 권장 방법을 보여 줍니다.The code also shows the recommended way to create a WorkflowInstance object in a workflow host using the CreateWorkflow method. WorkflowCompleted, WorkflowIdledWorkflowTerminated 이벤트에 대해 이벤트 처리기를 설정하는 방법도 보여 줍니다.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.

static void Main()
{
    string connectionString = "Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;";

    using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
    {
        ExternalDataExchangeService dataService = new ExternalDataExchangeService();
        workflowRuntime.AddService(dataService);
        dataService.AddService(expenseService);

        workflowRuntime.AddService(new SqlWorkflowPersistenceService(connectionString));
        workflowRuntime.StartRuntime();

        workflowRuntime.WorkflowCompleted += OnWorkflowCompleted;
        workflowRuntime.WorkflowTerminated += OnWorkflowTerminated;
        workflowRuntime.WorkflowIdled += OnWorkflowIdled;
        workflowRuntime.WorkflowAborted += OnWorkflowAborted;

        Type type = typeof(SampleWorkflow1);
        WorkflowInstance workflowInstance = workflowRuntime.CreateWorkflow(type);
        workflowInstance.Start();

        waitHandle.WaitOne();

        workflowRuntime.StopRuntime();
    }
}
Shared Sub Main()
    Dim connectionString As String = "Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;"
    Using workflowRuntime As New WorkflowRuntime()
        Dim dataService As New ExternalDataExchangeService()
        workflowRuntime.AddService(dataService)
        dataService.AddService(expenseService)

        workflowRuntime.AddService(New SqlWorkflowPersistenceService(connectionString))


        AddHandler workflowRuntime.WorkflowCompleted, AddressOf OnWorkflowCompleted
        AddHandler workflowRuntime.WorkflowTerminated, AddressOf OnWorkflowTerminated
        AddHandler workflowRuntime.WorkflowIdled, AddressOf OnWorkflowIdled
        AddHandler workflowRuntime.WorkflowAborted, AddressOf OnWorkflowAborted


        Dim workflowInstance As WorkflowInstance
        workflowInstance = workflowRuntime.CreateWorkflow(GetType(SampleWorkflow))
        workflowInstance.Start()

        waitHandle.WaitOne()

        workflowRuntime.StopRuntime()
    End Using
End Sub

설명

참고

이 자료에서는 더 이상 사용되지 않는 형식과 네임스페이스에 대해 설명합니다.This material discusses types and namespaces that are obsolete. 자세한 내용은 Deprecated Types in Windows Workflow Foundation 4.5(Windows Workflow Foundation 4.5에서 사용되지 않는 형식)를 참조하세요.For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

WorkflowRuntime은 호스트 애플리케이션 및 서비스가 워크플로 런타임 엔진을 구성 및 제어하고 워크플로 런타임 엔진 및 해당 워크플로 인스턴스 변경 내용에 대한 알림을 받는 데 필요한 기능을 노출합니다.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.

생성자

WorkflowRuntime() WorkflowRuntime() WorkflowRuntime() WorkflowRuntime()

WorkflowRuntime 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the WorkflowRuntime class.

WorkflowRuntime(String) WorkflowRuntime(String) WorkflowRuntime(String) WorkflowRuntime(String)

애플리케이션 구성 파일의 지정된 섹션을 사용하여 WorkflowRuntime 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the WorkflowRuntime class by using the specified section of the application configuration file.

WorkflowRuntime(WorkflowRuntimeSection) WorkflowRuntime(WorkflowRuntimeSection) WorkflowRuntime(WorkflowRuntimeSection) WorkflowRuntime(WorkflowRuntimeSection)

지정된 WorkflowRuntime의 설정을 사용하여 WorkflowRuntimeSection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the WorkflowRuntime class by using the settings in the specified WorkflowRuntimeSection.

속성

IsStarted IsStarted IsStarted IsStarted

워크플로 런타임 엔진이 시작되었는지 여부를 나타내는 값을 가져옵니다.Gets a value that indicates whether the workflow run-time engine has been started.

Name Name Name Name

WorkflowRuntime과 연결된 이름을 가져오거나 설정합니다.Gets or sets the name associated with the WorkflowRuntime.

메서드

AddService(Object) AddService(Object) AddService(Object) AddService(Object)

지정된 서비스를 워크플로 런타임 엔진에 추가합니다.Adds the specified service to the workflow run-time engine.

CreateWorkflow(Type) CreateWorkflow(Type) CreateWorkflow(Type) CreateWorkflow(Type)

지정된 워크플로 Type을 사용하여 새 워크플로 인스턴스를 만듭니다.Creates a new workflow instance by using the specified workflow Type.

CreateWorkflow(Type, Dictionary<String,Object>) CreateWorkflow(Type, Dictionary<String,Object>) CreateWorkflow(Type, Dictionary<String,Object>) CreateWorkflow(Type, Dictionary<String,Object>)

지정된 워크플로 Type 및 지정된 Dictionary<TKey,TValue>에 포함된 워크플로에 대한 인수를 사용하여 워크플로 인스턴스를 만듭니다.Creates a workflow instance by using the specified workflow Type and the arguments to the workflow contained in the specified Dictionary<TKey,TValue>.

CreateWorkflow(Type, Dictionary<String,Object>, Guid) CreateWorkflow(Type, Dictionary<String,Object>, Guid) CreateWorkflow(Type, Dictionary<String,Object>, Guid) CreateWorkflow(Type, Dictionary<String,Object>, Guid)

지정된 매개 변수를 사용하여 워크플로 인스턴스를 만듭니다.Creates a workflow instance by using the specified parameters.

CreateWorkflow(XmlReader) CreateWorkflow(XmlReader) CreateWorkflow(XmlReader) CreateWorkflow(XmlReader)

지정된 XmlReader를 사용하여 워크플로 인스턴스를 만듭니다.Creates a workflow instance by using the specified XmlReader.

CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>)

지정된 XmlReader 개체 및 지정된 Dictionary<TKey,TValue>에 포함된 인수를 사용하여 워크플로 인스턴스를 만듭니다.Creates a workflow instance by using the specified XmlReader objects and the arguments contained in the specified Dictionary<TKey,TValue>.

CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>, Guid) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>, Guid) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>, Guid) CreateWorkflow(XmlReader, XmlReader, Dictionary<String,Object>, Guid)

지정된 매개 변수를 사용하여 워크플로 인스턴스를 만듭니다.Creates a workflow instance by using the specified parameters.

Dispose() Dispose() Dispose() Dispose()

WorkflowRuntime에서 사용하는 리소스를 해제합니다.Releases the resources used by the WorkflowRuntime.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAllServices(Type) GetAllServices(Type) GetAllServices(Type) GetAllServices(Type)

지정된 Type을 구현하거나 해당 형식에서 파생되었으며 워크플로 런타임 엔진에 추가된 모든 서비스를 검색합니다.Retrieves all the services that are added to the workflow run-time engine that implement or derive from the specified Type.

GetAllServices<T>() GetAllServices<T>() GetAllServices<T>() GetAllServices<T>()

지정된 제네릭 형식을 구현하거나 해당 형식에서 파생되었으며 워크플로 런타임 엔진에 추가된 모든 서비스를 검색합니다.Retrieves all the services that are added to the workflow run-time engine that implement or derive from the specified generic type.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetLoadedWorkflows() GetLoadedWorkflows() GetLoadedWorkflows() GetLoadedWorkflows()

현재 메모리에 로드된 모든 워크플로 인스턴스를 포함하는 컬렉션을 가져옵니다.Gets a collection that contains all the workflow instances currently loaded in memory.

GetService(Type) GetService(Type) GetService(Type) GetService(Type)

워크플로 런타임 엔진에서 지정된 Type의 서비스를 검색합니다.Retrieves a service of the specified Type from the workflow run-time engine.

GetService<T>() GetService<T>() GetService<T>() GetService<T>()

워크플로 런타임 엔진에서 지정된 제네릭 형식의 서비스를 검색합니다.Retrieves a service of the specified generic type from the workflow run-time engine.

GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
GetWorkflow(Guid) GetWorkflow(Guid) GetWorkflow(Guid) GetWorkflow(Guid)

지정된 Guid가 있는 워크플로 인스턴스를 검색합니다.Retrieves the workflow instance that has the specified Guid.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveService(Object) RemoveService(Object) RemoveService(Object) RemoveService(Object)

워크플로 런타임 엔진에서 지정된 서비스를 제거합니다.Removes the specified service from the workflow run-time engine.

StartRuntime() StartRuntime() StartRuntime() StartRuntime()

워크플로 런타임 엔진과 워크플로 런타임 엔진 서비스를 시작합니다.Starts the workflow run-time engine and the workflow run-time engine services.

StopRuntime() StopRuntime() StopRuntime() StopRuntime()

워크플로 런타임 엔진과 런타임 서비스를 중지합니다.Stops the workflow run-time engine and the run-time services.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

이벤트

ServicesExceptionNotHandled ServicesExceptionNotHandled ServicesExceptionNotHandled ServicesExceptionNotHandled

WorkflowRuntimeService 클래스에서 파생된 서비스가 RaiseServicesExceptionNotHandledEvent(Exception, Guid)를 호출할 때 발생합니다.Occurs when a service that is derived from the WorkflowRuntimeService class calls RaiseServicesExceptionNotHandledEvent(Exception, Guid).

Started Started Started Started

워크플로 런타임 엔진이 시작될 때 발생합니다.Occurs when the workflow run-time engine is started.

Stopped Stopped Stopped Stopped

워크플로 런타임 엔진이 중지될 때 발생합니다.Occurs when the workflow run-time engine is stopped.

WorkflowAborted WorkflowAborted WorkflowAborted WorkflowAborted

워크플로 인스턴스가 중단될 때 발생합니다.Occurs when a workflow instance is aborted.

WorkflowCompleted WorkflowCompleted WorkflowCompleted WorkflowCompleted

워크플로 인스턴스가 완료될 때 발생합니다.Occurs when a workflow instance has completed.

WorkflowCreated WorkflowCreated WorkflowCreated WorkflowCreated

워크플로 인스턴스가 만들어질 때 발생합니다.Occurs when a workflow instance is created.

WorkflowIdled WorkflowIdled WorkflowIdled WorkflowIdled

워크플로 인스턴스가 유휴 상태에 들어갈 때 발생합니다.Occurs when a workflow instance enters the idle state.

WorkflowLoaded WorkflowLoaded WorkflowLoaded WorkflowLoaded

워크플로 인스턴스가 메모리에 로드될 때 발생합니다.Occurs when the workflow instance is loaded into memory.

WorkflowPersisted WorkflowPersisted WorkflowPersisted WorkflowPersisted

워크플로 인스턴스의 상태가 지속될 때 발생합니다.Occurs when the state of a workflow instance is persisted.

WorkflowResumed WorkflowResumed WorkflowResumed WorkflowResumed

워크플로 인스턴스의 실행이 일시 중단 후에 계속될 때 발생합니다.Occurs when execution of a workflow instance is resumed following a suspension.

WorkflowStarted WorkflowStarted WorkflowStarted WorkflowStarted

워크플로 인스턴스가 시작된 경우에 발생합니다.Occurs when a workflow instance has been started.

WorkflowSuspended WorkflowSuspended WorkflowSuspended WorkflowSuspended

워크플로 인스턴스가 일시 중단될 때 발생합니다.Occurs when a workflow instance is suspended.

WorkflowTerminated WorkflowTerminated WorkflowTerminated WorkflowTerminated

워크플로 인스턴스가 종료될 때 발생합니다.Occurs when a workflow instance is terminated.

WorkflowUnloaded WorkflowUnloaded WorkflowUnloaded WorkflowUnloaded

워크플로 인스턴스가 메모리에서 언로드될 때 발생합니다.Occurs when the workflow instance is unloaded from memory.

적용 대상

스레드 보안

이 형식은 스레드로부터 안전합니다.This type is thread safe.