WorkflowApplication 類別

定義

提供工作流程單一執行個體的主機。Provides a host for a single instance of a workflow.

public ref class WorkflowApplication sealed : System::Activities::Hosting::WorkflowInstance
public sealed class WorkflowApplication : System.Activities.Hosting.WorkflowInstance
type WorkflowApplication = class
    inherit WorkflowInstance
Public NotInheritable Class WorkflowApplication
Inherits WorkflowInstance
繼承
WorkflowApplication

範例

下列範例會使用 WorkflowApplication 來裝載工作流程。The following example hosts a workflow using WorkflowApplication. 系統會使用指定的工作流程定義來建構 WorkflowApplication 執行個體、處理所需的工作流程開發週期事件,並且透過呼叫 Run 叫用此工作流程。A WorkflowApplication instance is constructed using the specified workflow definition, the desired workflow lifecycle events are handled, and the workflow is invoked with a call to Run. 當工作流程完成時,主控台就會顯示下列輸出。When the workflow is completed, the following output is displayed to the console.

Starting the workflow.   
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Idle.   
Ending the workflow.   
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Completed  
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Unloaded.  
  
Activity wf = new Sequence
{
    Activities =
     {
         new WriteLine
         {
             Text = "Starting the workflow."
         },
         new Delay
         {
             Duration = TimeSpan.FromSeconds(5)
         },
         new WriteLine
         {
             Text = "Ending the workflow."
         }
     }
};

// Create a WorkflowApplication instance.
WorkflowApplication wfApp = new WorkflowApplication(wf);

// Subscribe to any desired workflow lifecycle events.
wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e)
{
    if (e.CompletionState == ActivityInstanceState.Faulted)
    {
        Console.WriteLine("Workflow {0} Terminated.", e.InstanceId);
        Console.WriteLine("Exception: {0}\n{1}",
            e.TerminationException.GetType().FullName,
            e.TerminationException.Message);
    }
    else if (e.CompletionState == ActivityInstanceState.Canceled)
    {
        Console.WriteLine("Workflow {0} Canceled.", e.InstanceId);
    }
    else
    {
        Console.WriteLine("Workflow {0} Completed.", e.InstanceId);

        // Outputs can be retrieved from the Outputs dictionary,
        // keyed by argument name.
        // Console.WriteLine("The winner is {0}.", e.Outputs["Winner"]);
    }
};

wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)
{
    // Display the exception that caused the workflow
    // to abort.
    Console.WriteLine("Workflow {0} Aborted.", e.InstanceId);
    Console.WriteLine("Exception: {0}\n{1}",
        e.Reason.GetType().FullName,
        e.Reason.Message);
};

wfApp.Idle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Perform any processing that should occur
    // when a workflow goes idle. If the workflow can persist,
    // both Idle and PersistableIdle are called in that order.
    Console.WriteLine("Workflow {0} Idle.", e.InstanceId);
};

wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Instruct the runtime to persist and unload the workflow
    return PersistableIdleAction.Unload;
};

wfApp.Unloaded = delegate(WorkflowApplicationEventArgs e)
{
    Console.WriteLine("Workflow {0} Unloaded.", e.InstanceId);
};

wfApp.OnUnhandledException = delegate(WorkflowApplicationUnhandledExceptionEventArgs e)
{
    // Display the unhandled exception.
    Console.WriteLine("OnUnhandledException in Workflow {0}\n{1}",
        e.InstanceId, e.UnhandledException.Message);

    Console.WriteLine("ExceptionSource: {0} - {1}",
        e.ExceptionSource.DisplayName, e.ExceptionSourceInstanceId);

    // Instruct the runtime to terminate the workflow.
    // Other choices are Abort and Cancel
    return UnhandledExceptionAction.Terminate;
};

// Run the workflow.
wfApp.Run();

備註

WorkflowApplication 類別會提供工作流程單一執行個體的主機。The WorkflowApplication class provides a host for a single workflow instance. 這是工作流程執行階段管理的實際工作流程執行個體所屬的 Proxy。It is a proxy to the actual workflow instance that is managed by the workflow runtime. WorkflowApplication 的使用者可指示工作流程執行階段呼叫 WorkflowApplication 物件上適當的方法,以便在工作流程執行個體上執行動作。Users of WorkflowApplication can instruct the workflow runtime to perform actions on a workflow instance by calling the appropriate methods on a WorkflowApplication object. 如果要求的動作無效,就會擲回例外狀況。If a requested action is not valid, an exception is thrown.

使用 WorkflowApplication 可執行下列工作:Using WorkflowApplication you can perform the following tasks:

  1. 建立新的工作流程執行個體,或從執行個體存放區載入工作流程執行個體。Create a new workflow instance, or load a workflow instance from an instance store.

  2. 提供工作流程執行個體中的活動使用的擴充。Provide extensions to be used by activities within a workflow instance.

  3. 控制工作流程執行個體的執行。Control the execution of a workflow instance.

  4. 繼續工作流程執行個體中的活動所使用的書籤。Resume a bookmark created by an activity within a workflow instance.

  5. 保存或卸載工作流程執行個體。Persist or unload a workflow instance.

  6. 接收工作流程執行個體開發週期事件的通知。Be notified of workflow instance lifecycle events.

建構函式

WorkflowApplication(Activity)

使用指定的工作流程定義,建立 WorkflowApplication 類別的新執行個體。Creates a new instance of the WorkflowApplication class with the specified workflow definition.

WorkflowApplication(Activity, IDictionary<String,Object>)

建立使用指定工作流程定義及引數值的 WorkflowApplication 類別新執行個體。Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values.

WorkflowApplication(Activity, IDictionary<String,Object>, WorkflowIdentity)

建立使用指定的工作流程定義和引數值以及定義識別的 WorkflowApplication 類別新執行個體。Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values, and definition identity.

WorkflowApplication(Activity, WorkflowIdentity)

使用指定的工作流程定義和定義識別,建立 WorkflowApplication 類別的新執行個體。Creates a new instance of the WorkflowApplication class with the specified workflow definition and definition identity.

屬性

Aborted

取得或設定終止工作流程執行個體時叫用的 Action<T>Gets or sets the Action<T> that is invoked when the workflow instance is aborted.

Completed

取得或設定完成工作流程執行個體時所叫用的 Action<T>Gets or sets the Action<T> that is invoked when the workflow instance completes.

Controller

取得這個 WorkflowInstance.WorkflowInstanceControlWorkflowInstance 執行個體。Gets the WorkflowInstance.WorkflowInstanceControl instance for this WorkflowInstance.

(繼承來源 WorkflowInstance)
DefinitionIdentity

取得或設定 WorkflowInstance 的定義識別。Gets or sets the definition identity of WorkflowInstance.

(繼承來源 WorkflowInstance)
Extensions

取得目前工作流程執行個體延伸的集合。Gets the collection of extensions for the current workflow instance.

HostEnvironment

取得或設定工作流程執行個體引數和變數的根環境。Gets or sets the root environment for the workflow instance's arguments and variables.

(繼承來源 WorkflowInstance)
Id

取得目前工作流程應用程式執行個體中的 128 位元 GUID 識別碼。Gets the 128-bit GUID identifier of the current workflow application instance.

Idle

取得或設定現有工作流程執行個體故障時叫用的 Action<T>Gets or sets the Action<T> that is invoked when the current workflow instance becomes idle.

InstanceStore

取得或設定物件,這個物件會針對目前工作流程應用程式之執行個體的存放狀態提供存取。Gets or sets an object that provides access to the persisted state of the current instance of the workflow application.

IsReadOnly

取得指出工作流程執行個體是否已初始化的值。Gets a value that indicates whether the workflow instance has been initialized.

(繼承來源 WorkflowInstance)
OnUnhandledException

取得或設定現有工作流程執行個體遭遇未處理例外狀況時,會叫用的 Func<T,TResult>Gets or sets the Func<T,TResult> that is invoked when the current workflow instance encounters an unhandled exception.

PersistableIdle

取得或設定當目前工作流程執行個體閒置且可保存時叫用的委派。Gets or sets the delegate that is invoked when the current workflow instance is idle and can be persisted.

SupportsInstanceKeys

取得值,這個值表示主機是否支援 InstanceKeys 與執行階段執行個體的關聯。Gets a value that indicates whether the host supports the association of InstanceKeys with a run-time instance.

(繼承來源 WorkflowInstance)
SynchronizationContext

取得或設定用於排程工作流程執行個體的 SynchronizationContextGets or sets the SynchronizationContext used for scheduling the workflow instance.

(繼承來源 WorkflowInstance)
Unloaded

取得或設定現有工作流程卸載時叫用的 Action<T>Gets or sets the Action<T> that is invoked when the current workflow unloads.

WorkflowDefinition

取得工作流程執行個體的工作流程定義。Gets the workflow definition of the workflow instance.

(繼承來源 WorkflowInstance)

方法

Abort()

通知工作流程執行階段此工作流程執行個體應該中止。Notifies the workflow runtime that this workflow instance should abort.

Abort(String)

通知工作流程執行階段此工作流程執行個體應該因指定原因而中止。Notifies the workflow runtime that this workflow instance should abort for the specified reason.

AddInitialInstanceValues(IDictionary<XName,Object>)

指定執行個體中繼資料值,這些值會連同第一個持續性新執行個體納入。Specifies instance metadata values that are included with the first persistence of a new instance.

BeginCancel(AsyncCallback, Object)

使用指定的 AsyncCallback 和使用者提供的狀態,以非同步方式取消工作流程執行個體。Cancels a workflow instance asynchronously using the specified AsyncCallback and user-provided state.

BeginCancel(TimeSpan, AsyncCallback, Object)

使用指定的逾時間隔、AsyncCallback 和使用者提供的狀態,以非同步方式取消工作流程執行個體。Cancels a workflow instance asynchronously using the specified time-out interval, AsyncCallback, and user-provided state.

BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、定義識別、識別篩選器、回呼和狀態,非同步建立預設執行個體擁有者。Creates a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, definition identity, identity filter, callback and state.

BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、定義識別、識別篩選器、逾時間隔、回呼和狀態,非同步建立預設執行個體擁有者。Creates a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, definition identity, identity filter, timeout interval, callback and state.

BeginDeleteDefaultInstanceOwner(InstanceStore, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、回呼和狀態,非同步刪除預設執行個體擁有者。Deletes a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、逾時間隔、回呼和狀態,非同步刪除預設執行個體擁有者。Deletes a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, timeout interval, callback, and state.

BeginFlushTrackingRecords(TimeSpan, AsyncCallback, Object)

由工作流程執行階段呼叫,會開始傳送暫止的追蹤記錄,以非同步的方式追蹤參與者。Called by the workflow runtime to begin sending pending tracking records to tracking participants asynchronously.

(繼承來源 WorkflowInstance)
BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體識別碼、執行個體存放區、回呼和狀態,非同步擷取執行個體擁有者。Retrieves an instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance identifier, instance store, callback, and state.

BeginGetInstance(Guid, InstanceStore, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體識別碼、執行個體存放區、逾時間隔、回呼和狀態,非同步擷取執行個體擁有者。Retrieves an instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance identifier, instance store, timeout interval, callback, and state.

BeginGetRunnableInstance(InstanceStore, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、回呼和狀態,非同步擷取可執行的執行個體擁有者。Retrieves a runnable instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體存放區、逾時間隔、回呼和狀態,非同步擷取可執行的執行個體擁有者。Retrieves a runnable instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, timeout interval, callback, and state.

BeginLoad(Guid, AsyncCallback, Object)

使用指定的執行個體識別項、回呼方法及使用者提供的狀態,以非同步方式從執行個體存放區載入工作流程。Loads a workflow asynchronously from an instance store using the specified instance identifier, callback method, and user-provided state.

BeginLoad(Guid, TimeSpan, AsyncCallback, Object)

使用指定的執行個體識別項、逾時時間、回呼方法及使用者提供的狀態,以非同步方式從執行個體存放區載入工作流程。Loads a workflow asynchronously from an instance store using the specified instance identifier, timeout period, callback method, and user-provided state.

BeginLoad(WorkflowApplicationInstance, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體、回呼和狀態,從執行個體存放區非同步載入工作流程。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, callback and state.

BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體、更新對應、回呼和狀態,從執行個體存放區非同步載入工作流程。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, update map, callback and state.

BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體、更新對應、逾時間隔、回呼和狀態,從執行個體存放區非同步載入工作流程。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, update map, timeout interval, callback and state.

BeginLoad(WorkflowApplicationInstance, TimeSpan, AsyncCallback, Object)

使用 IAsyncResult 非同步設計模式,以指定的執行個體、逾時間隔、回呼和狀態,從執行個體存放區非同步載入工作流程。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, timeout interval, callback and state.

BeginLoadRunnableInstance(AsyncCallback, Object)

InstanceStore 啟始載入可執行工作流程執行個體的作業。Initiates an operation to load a runnable workflow instance from the InstanceStore.

BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object)

使用指定逾時間隔,從 InstanceStore 啟始載入可執行工作流程執行個體的作業。Initiates an operation to load a runnable workflow instance from the InstanceStore using the specified time-out interval.

BeginPersist(AsyncCallback, Object)

使用指定的回呼方法及使用者提供的狀態,以非同步方式將工作流程執行個體保存到執行個體存放區。Persists a workflow instance to an instance store asynchronously using the specified callback method and user-provided state.

BeginPersist(TimeSpan, AsyncCallback, Object)

使用指定的逾時間隔、回呼方法及使用者提供的狀態,以非同步方式將工作流程執行個體保存到執行個體存放區。Persists a workflow instance to an instance store asynchronously using the specified time-out interval, callback method, and user-provided state.

BeginResumeBookmark(Bookmark, Object, AsyncCallback, Object)

使用指定的值、回呼方法與狀態來啟始繼續書籤的作業。Initiates an operation to resume a bookmark using the specified value, callback method, and state.

BeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object)

使用指定的值、逾時間隔、回呼方法與狀態來啟始繼續書籤的作業。Initiates an operation to resume a bookmark using the specified value, time-out interval, callback method, and state.

BeginResumeBookmark(String, Object, AsyncCallback, Object)

使用指定的值、回呼方法與狀態來啟始非同步作業,以使用指定名稱繼續書籤。Initiates an asynchronous operation to resume the bookmark with the specified name, using the specified value, callback method, and state. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

BeginResumeBookmark(String, Object, TimeSpan, AsyncCallback, Object)

使用指定的值、逾時間隔、回呼方法與狀態來啟始非同步作業,以使用指定名稱繼續書籤。Initiates an asynchronous operation to resume the bookmark with the specified name, using the specified value, time-out interval, callback method, and state. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

BeginRun(AsyncCallback, Object)

使用指定的回呼方法及使用者提供的狀態,以非同步方式啟動或繼續工作流程執行個體。Starts or resumes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginRun(TimeSpan, AsyncCallback, Object)

使用指定的逾時間隔、回呼方法及使用者提供的狀態,以非同步方式啟動或繼續工作流程執行個體。Starts or resumes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

BeginTerminate(Exception, AsyncCallback, Object)

使用指定的例外狀況、回呼方法及使用者提供的狀態,以非同步方式終止工作流程執行個體。Terminates a workflow instance asynchronously using the specified exception, callback method, and user-provided state.

BeginTerminate(Exception, TimeSpan, AsyncCallback, Object)

使用指定的例外狀況、逾時間隔、回呼方法及使用者提供的狀態,以非同步方式終止工作流程執行個體。Terminates a workflow instance asynchronously using the specified exception, time-out interval, callback method, and user-provided state.

BeginTerminate(String, AsyncCallback, Object)

使用指定的錯誤訊息、回呼方法及使用者提供的狀態,非同步終止工作流程執行個體。Terminates a workflow instance asynchronously using the specified error message, callback method, and user-provided state.

BeginTerminate(String, TimeSpan, AsyncCallback, Object)

使用指定的錯誤訊息、逾時間隔、回呼方法及使用者提供的狀態,非同步終止工作流程執行個體。Terminates a workflow instance asynchronously using the specified error message, time-out interval, callback method, and user-provided state.

BeginUnload(AsyncCallback, Object)

使用指定的回呼方法及使用者提供的狀態,以非同步方式保存和處置工作流程執行個體。Persists and disposes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginUnload(TimeSpan, AsyncCallback, Object)

使用指定的逾時間隔、回呼方法及使用者提供的狀態,以非同步方式保存和處置工作流程執行個體。Persists and disposes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

Cancel()

取消工作流程執行個體。Cancels the workflow instance.

Cancel(TimeSpan)

取消使用指定逾時間隔的工作流程執行個體。Cancels the workflow instance using the specified time-out interval.

CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter)

使用指定的執行個體存放區、定義識別和識別篩選器,建立工作流程的預設執行個體擁有者。Creates a default instance owner for the workflow using specified instance store, definition identity, and identity filter.

CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan)

使用指定的執行個體存放區、定義識別、識別篩選器和逾時間隔,建立工作流程的預設執行個體擁有者。Creates a default instance owner for the workflow using specified instance store, definition identity, and identity filter and timeout interval.

DeleteDefaultInstanceOwner(InstanceStore)

以指定的執行個體存放區,刪除工作流程的預設執行個體擁有者。Deletes a default instance owner for the workflow with specified instance store.

DeleteDefaultInstanceOwner(InstanceStore, TimeSpan)

以指定的執行個體存放區和逾時間隔,刪除工作流程的預設執行個體擁有者。Deletes a default instance owner for the workflow with specified instance store and timeout interval.

DisposeExtensions()

在所有實作 Dispose() 的擴充呼叫 IDisposableCalls Dispose() on all extensions that implement IDisposable.

(繼承來源 WorkflowInstance)
EndCancel(IAsyncResult)

等候暫止的非同步取消作業完成。Waits for the pending asynchronous cancel operation to complete.

EndCreateDefaultInstanceOwner(IAsyncResult)

等候完成建立預設執行個體擁有者。Waits for the creation of default instance owner to complete.

EndDeleteDefaultInstanceOwner(IAsyncResult)

等候完成刪除預設執行個體擁有者。Waits for the deletion of default instance owner to complete.

EndFlushTrackingRecords(IAsyncResult)

由工作流程執行階段呼叫以結束追蹤作業。Called by the workflow runtime to end the track operation.

(繼承來源 WorkflowInstance)
EndGetInstance(IAsyncResult)

等候完成擷取執行個體。Waits for the instance retrieval to complete.

EndGetRunnableInstance(IAsyncResult)

等候完成可執行之執行個體作業的非同步擷取。Waits for the asynchronous retrieval of runnable instance operation to complete.

EndLoad(IAsyncResult)

等候暫止的非同步載入作業完成。Waits for the pending asynchronous load operation to complete.

EndLoadRunnableInstance(IAsyncResult)

等候非同步載入可執行執行個體作業完成。Waits for the asynchronous load runnable instance operation to complete.

EndPersist(IAsyncResult)

等候暫止的非同步保存作業完成。Waits for the pending asynchronous persist operation to complete.

EndResumeBookmark(IAsyncResult)

等候書籤繼續作業完成Waits for a bookmark resume operation to complete.

EndRun(IAsyncResult)

等候暫止的非同步執行作業完成。Waits for the pending asynchronous run operation to complete.

EndTerminate(IAsyncResult)

等候暫止的非同步終止作業完成。Waits for the pending asynchronous terminate operation to complete.

EndUnload(IAsyncResult)

等候暫止的非同步卸載作業完成。Waits for the pending asynchronous unload operation to complete.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
FlushTrackingRecords(TimeSpan)

由工作流程執行階段呼叫,會傳送暫止的追蹤記錄至追蹤參與者。Called by the workflow runtime to send pending tracking records to tracking participants.

(繼承來源 WorkflowInstance)
GetBookmarks()

傳回工作流程執行個體的書籤集合。Returns the collection of bookmarks for the workflow instance.

GetBookmarks(TimeSpan)

傳回使用指定逾時間隔的工作流程執行個體書籤集合。Returns the collection of bookmarks for the workflow instance using the specified time-out interval.

GetExtension<T>()

傳回指定型別的擴充。Returns an extension of the specified type.

(繼承來源 WorkflowInstance)
GetExtensions<T>()

傳回找到之指定型別的所有擴充。Returns all extensions found for the specified type.

(繼承來源 WorkflowInstance)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetInstance(Guid, InstanceStore)

使用指定的執行個體識別項和執行個體存放區擷取工作流程執行個體。Retrieves the workflow instance using specified instance identifier and instance store.

GetInstance(Guid, InstanceStore, TimeSpan)

使用指定的執行個體識別項、執行個體存放區和逾時間隔擷取工作流程執行個體。Retrieves the workflow instance using specified instance identifier, instance store and timeout interval.

GetRunnableInstance(InstanceStore)

以指定的執行個體存放區擷取工作流程的可執行執行個體。Retrieves the runnable instance of the workflow with specified instance store.

GetRunnableInstance(InstanceStore, TimeSpan)

以指定的執行個體存放區和逾時間隔,擷取工作流程的可執行執行個體。Retrieves the runnable instance of the workflow with specified instance store and timeout interval.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
Initialize(IDictionary<String,Object>, IList<Handle>)

由主機呼叫,以引數值和執行屬性初始化工作流程執行個體。Called by the host to initialize the workflow instance with the argument values and execution properties.

(繼承來源 WorkflowInstance)
Initialize(Object)

由主機呼叫,以工作流程執行階段狀態初始化工作流程執行個體。Called by the host to initialize the workflow instance with the workflow run-time state.

(繼承來源 WorkflowInstance)
Initialize(Object, DynamicUpdateMap)

由主機呼叫,以工作流程執行階段狀態和更新對應初始化工作流程執行個體。Called by the host to initialize the workflow instance with the workflow run-time state and update map.

(繼承來源 WorkflowInstance)
Load(Guid)

將指定的工作流程執行個體從執行個體存放區載入記憶體中。Loads the specified workflow instance into memory from an instance store.

Load(Guid, TimeSpan)

使用指定逾時間隔,將指定的工作流程執行個體從執行個體存放區載入記憶體。Loads the specified workflow instance into memory from an instance store using the specified time-out interval.

Load(WorkflowApplicationInstance)

以指定的執行個體,從執行個體存放區載入工作流程執行個體。Loads a workflow instance from an instance store with specified instance.

Load(WorkflowApplicationInstance, DynamicUpdateMap)

以指定的執行個體和更新對應,從執行個體存放區載入工作流程執行個體。Loads a workflow instance from an instance store with specified instance and update map.

Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan)

以指定的執行個體、更新對應和逾時間隔,從執行個體存放區載入工作流程執行個體。Loads a workflow instance from an instance store with specified instance, update map and timeout interval.

Load(WorkflowApplicationInstance, TimeSpan)

以指定的執行個體和逾時間隔,從執行個體存放區載入工作流程執行個體。Loads a workflow instance from an instance store with specified instance and timeout interval.

LoadRunnableInstance()

InstanceStore 載入可執行工作流程執行個體。Loads a runnable workflow instance from the InstanceStore.

LoadRunnableInstance(TimeSpan)

使用指定逾時間隔,從 InstanceStore 載入可執行工作流程執行個體。Loads a runnable workflow instance from the InstanceStore using the specified time-out interval.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OnBeginAssociateKeys(ICollection<InstanceKey>, AsyncCallback, Object)

由工作流程執行階段呼叫,以通知主機新的執行個體索引鍵應與這個執行個體相關聯。Called by the workflow runtime to notify the host that new instance keys should be associated with this instance.

(繼承來源 WorkflowInstance)
OnBeginFlushTrackingRecords(AsyncCallback, Object)

要求主機清除暫止的追蹤記錄以追蹤參與者的非同步呼叫。Asynchronous call to ask host to flush pending tracking records to tracking participants.

(繼承來源 WorkflowInstance)
OnBeginPersist(AsyncCallback, Object)

要求主機保留工作流程的非同步呼叫。Asynchronous call to ask the host to persist the workflow.

(繼承來源 WorkflowInstance)
OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object)

由工作流程執行階段呼叫以通知主機繼續書籤作業即將開始。Called by the workflow runtime to notify the host that a resume bookmark operation is beginning.

(繼承來源 WorkflowInstance)
OnDisassociateKeys(ICollection<InstanceKey>)

由工作流程執行階段呼叫,以通知主機特定的執行個體索引鍵集不應再與這個執行個體相關聯。Called by the workflow runtime to notify the host that a certain set of instance keys should no longer be associated with this instance.

(繼承來源 WorkflowInstance)
OnEndAssociateKeys(IAsyncResult)

由工作流程執行階段呼叫以通知主機關聯索引鍵作業已完成。Called by the workflow runtime to notify the host that an associate keys operation is complete.

(繼承來源 WorkflowInstance)
OnEndFlushTrackingRecords(IAsyncResult)

由工作流程執行階段呼叫以通知主機清除追蹤記錄作業已完成。Called by the workflow runtime to notify the host when the flush tracking records operation is complete.

(繼承來源 WorkflowInstance)
OnEndPersist(IAsyncResult)

由工作流程執行階段呼叫以通知主機保留作業已完成。Called by the workflow runtime to notify the host that a persist operation is complete.

(繼承來源 WorkflowInstance)
OnEndResumeBookmark(IAsyncResult)

由工作流程執行階段呼叫以通知主機繼續書籤作業已完成。Called by the workflow runtime to notify the host that a resume bookmark operation is complete.

(繼承來源 WorkflowInstance)
OnNotifyPaused()

由工作流程執行階段呼叫,以通知主機工作流程執行個體已從執行中狀態轉換成已暫停狀態。Called by the workflow runtime to notify the host that the workflow instance has transitioned from the running state to the paused state.

(繼承來源 WorkflowInstance)
OnNotifyUnhandledException(Exception, Activity, String)

由工作流程執行階段呼叫,以通知主機工作流程執行個體中發生未處理的例外狀況。Called by the workflow runtime to notify the host an unhandled exception has occurred in the workflow instance.

(繼承來源 WorkflowInstance)
OnRequestAbort(Exception)

由工作流程執行階段呼叫,以通知主機已要求工作流程執行個體中止作業。Called by the workflow runtime to notify the host that an abort operation has been requested for the workflow instance.

(繼承來源 WorkflowInstance)
Persist()

將工作流程執行個體保存到執行個體存放區。Persists a workflow instance to an instance store.

Persist(TimeSpan)

使用指定逾時間隔,將工作流程執行個體保存到執行個體存放區。Persists a workflow instance to an instance store using the specified time-out interval.

RegisterExtensionManager(WorkflowInstanceExtensionManager)

由主機呼叫,以註冊指定的擴充管理員、驗證所有必要的擴充均存在,並且初始化要使用的擴充集合。Called by the host to register the specified extension manager, validate that all required extensions are present, and to initialize the collection of extensions to be used.

(繼承來源 WorkflowInstance)
ResumeBookmark(Bookmark, Object)

使用指定的值啟始繼續指定書籤的作業。Initiates an operation to resume the specified bookmark, using the specified value. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(Bookmark, Object, TimeSpan)

使用指定的值與逾時間隔啟始繼續指定書籤的作業。Initiates an operation to resume the specified bookmark, using the specified value and time-out interval. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(String, Object)

使用指定的值啟始繼續書籤 (具有指定名稱) 的作業。Initiates an operation to resume the bookmark with the specified name, using the specified value. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(String, Object, TimeSpan)

使用指定的值與逾時間隔啟始繼續書籤 (具有指定名稱) 的作業。Initiates an operation to resume the bookmark with the specified name, using the specified value and time-out interval. 要繼續的書籤是由工作流程執行個體中的活動事先建立的。The bookmark to be resumed is previously created by an activity within the workflow instance.

Run()

開始或繼續執行工作流程執行個體。Begins or resumes the execution of a workflow instance.

Run(TimeSpan)

開始或繼續執行使用指定逾時間隔的工作流程執行個體。Begins or resumes the execution of a workflow instance using the specified time-out interval.

Terminate(Exception)

使用指定的例外狀況,終止工作流程執行個體。Terminates a workflow instance using the specified exception.

Terminate(Exception, TimeSpan)

使用指定的例外狀況和逾時間隔,終止工作流程執行個體。Terminates a workflow instance using the specified exception and time-out interval.

Terminate(String)

使用指定的錯誤訊息,終止工作流程執行個體。Terminates a workflow instance using the specified error message.

Terminate(String, TimeSpan)

使用指定的錯誤訊息和逾時間隔,終止工作流程執行個體。Terminates a workflow instance using the specified error message and time-out interval.

ThrowIfReadOnly()

如果已初始化工作流程執行個體,就會依 InvalidOperationException 的判定擲回 IsReadOnlyThrows an InvalidOperationException if the workflow instance has been initialized, as determined by IsReadOnly.

(繼承來源 WorkflowInstance)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
Unload()

保存或卸載工作流程執行個體。Persists and unloads a workflow instance.

Unload(TimeSpan)

保存與卸載使用指定逾時間隔的工作流程執行個體。Persists and unloads a workflow instance using the specified time-out interval.

適用於