WorkflowApplication.Load 方法

定義

從執行個體存放區載入工作流程執行個體。Loads a workflow instance from an instance store.

多載

Load(WorkflowApplicationInstance)

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

Load(Guid)

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

Load(WorkflowApplicationInstance, DynamicUpdateMap)

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

Load(WorkflowApplicationInstance, TimeSpan)

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

Load(Guid, TimeSpan)

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

Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan)

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

Load(WorkflowApplicationInstance)

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

public:
 void Load(System::Activities::WorkflowApplicationInstance ^ instance);
public void Load (System.Activities.WorkflowApplicationInstance instance);
member this.Load : System.Activities.WorkflowApplicationInstance -> unit
Public Sub Load (instance As WorkflowApplicationInstance)

參數

instance
WorkflowApplicationInstance

執行個體。The instance.

Load(Guid)

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

public:
 void Load(Guid instanceId);
public void Load (Guid instanceId);
member this.Load : Guid -> unit
Public Sub Load (instanceId As Guid)

參數

instanceId
Guid

工作流程執行個體的全域唯一 128 位元識別碼。A globally unique 128-bit identifier for the workflow instance.

範例

下列範例會呼叫 Load,從 SqlWorkflowInstanceStore 中載入已保存的工作流程執行個體。The following example calls Load to load persisted workflow instance from a SqlWorkflowInstanceStore. 這個範例來自LoadAndCompleteInstance 保存工作流程應用程式範例中的方法。This example is from the LoadAndCompleteInstance method in the Persisting a Workflow Application sample.

string input = Console.ReadLine();

WorkflowApplication application = new WorkflowApplication(activity);
application.InstanceStore = instanceStore;

application.Completed = (workflowApplicationCompletedEventArgs) =>
{
    Console.WriteLine("\nWorkflowApplication has Completed in the {0} state.", workflowApplicationCompletedEventArgs.CompletionState);
};

application.Unloaded = (workflowApplicationEventArgs) =>
{
    Console.WriteLine("WorkflowApplication has Unloaded\n");
    instanceUnloaded.Set();
};

application.Load(id);

//this resumes the bookmark setup by readline
application.ResumeBookmark(readLineBookmark, input);

instanceUnloaded.WaitOne();

Load(WorkflowApplicationInstance, DynamicUpdateMap)

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

public:
 void Load(System::Activities::WorkflowApplicationInstance ^ instance, System::Activities::DynamicUpdate::DynamicUpdateMap ^ updateMap);
public void Load (System.Activities.WorkflowApplicationInstance instance, System.Activities.DynamicUpdate.DynamicUpdateMap updateMap);
member this.Load : System.Activities.WorkflowApplicationInstance * System.Activities.DynamicUpdate.DynamicUpdateMap -> unit
Public Sub Load (instance As WorkflowApplicationInstance, updateMap As DynamicUpdateMap)

參數

instance
WorkflowApplicationInstance

執行個體。The instance.

updateMap
DynamicUpdateMap

更新對應。The update map.

Load(WorkflowApplicationInstance, TimeSpan)

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

public:
 void Load(System::Activities::WorkflowApplicationInstance ^ instance, TimeSpan timeout);
public void Load (System.Activities.WorkflowApplicationInstance instance, TimeSpan timeout);
member this.Load : System.Activities.WorkflowApplicationInstance * TimeSpan -> unit
Public Sub Load (instance As WorkflowApplicationInstance, timeout As TimeSpan)

參數

instance
WorkflowApplicationInstance

執行個體。The instance.

timeout
TimeSpan

開始載入作業必須在作業取消前完成的間隔。The interval in which the begin load operation must complete before the operation is canceled.

Load(Guid, TimeSpan)

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

public:
 void Load(Guid instanceId, TimeSpan timeout);
public void Load (Guid instanceId, TimeSpan timeout);
member this.Load : Guid * TimeSpan -> unit
Public Sub Load (instanceId As Guid, timeout As TimeSpan)

參數

instanceId
Guid

工作流程執行個體的全域唯一 128 位元識別碼。A globally unique 128-bit identifier for the workflow instance.

timeout
TimeSpan

載入作業必須在載入作業取消並擲回 TimeoutException 前完成的間隔。The interval in which the load operation must complete before the load operation is canceled and a TimeoutException is thrown.

範例

下列範例會呼叫 Load,從 SqlWorkflowInstanceStore 中載入已保存的工作流程執行個體。The following example calls Load to load persisted workflow instance from a SqlWorkflowInstanceStore. 這個範例來自LoadAndCompleteInstance 保存工作流程應用程式範例中的方法。This example is from the LoadAndCompleteInstance method in the Persisting a Workflow Application sample.

string input = Console.ReadLine();

WorkflowApplication application = new WorkflowApplication(activity);
application.InstanceStore = instanceStore;

application.Completed = (workflowApplicationCompletedEventArgs) =>
{
    Console.WriteLine("\nWorkflowApplication has Completed in the {0} state.", workflowApplicationCompletedEventArgs.CompletionState);
};

application.Unloaded = (workflowApplicationEventArgs) =>
{
    Console.WriteLine("WorkflowApplication has Unloaded\n");
    instanceUnloaded.Set();
};

application.Load(id);

//this resumes the bookmark setup by readline
application.ResumeBookmark(readLineBookmark, input);

instanceUnloaded.WaitOne();

Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan)

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

public:
 void Load(System::Activities::WorkflowApplicationInstance ^ instance, System::Activities::DynamicUpdate::DynamicUpdateMap ^ updateMap, TimeSpan timeout);
public void Load (System.Activities.WorkflowApplicationInstance instance, System.Activities.DynamicUpdate.DynamicUpdateMap updateMap, TimeSpan timeout);
member this.Load : System.Activities.WorkflowApplicationInstance * System.Activities.DynamicUpdate.DynamicUpdateMap * TimeSpan -> unit
Public Sub Load (instance As WorkflowApplicationInstance, updateMap As DynamicUpdateMap, timeout As TimeSpan)

參數

instance
WorkflowApplicationInstance

執行個體。The instance.

updateMap
DynamicUpdateMap

更新對應。The update map.

timeout
TimeSpan

開始載入作業必須在作業取消前完成的間隔。The interval in which the begin load operation must complete before the operation is canceled.

適用於