WorkflowApplication.Load WorkflowApplication.Load WorkflowApplication.Load WorkflowApplication.Load Method

Definition

Loads a workflow instance from an instance store.

Overloads

Load(WorkflowApplicationInstance) Load(WorkflowApplicationInstance) Load(WorkflowApplicationInstance) Load(WorkflowApplicationInstance)

Loads a workflow instance from an instance store with specified instance.

Load(Guid) Load(Guid) Load(Guid) Load(Guid)

Loads the specified workflow instance into memory from an instance store.

Load(WorkflowApplicationInstance, DynamicUpdateMap) Load(WorkflowApplicationInstance, DynamicUpdateMap) Load(WorkflowApplicationInstance, DynamicUpdateMap) Load(WorkflowApplicationInstance, DynamicUpdateMap)

Loads a workflow instance from an instance store with specified instance and update map.

Load(WorkflowApplicationInstance, TimeSpan) Load(WorkflowApplicationInstance, TimeSpan) Load(WorkflowApplicationInstance, TimeSpan) Load(WorkflowApplicationInstance, TimeSpan)

Loads a workflow instance from an instance store with specified instance and timeout interval.

Load(Guid, TimeSpan) Load(Guid, TimeSpan) Load(Guid, TimeSpan) Load(Guid, TimeSpan)

Loads the specified workflow instance into memory from an instance store using the specified time-out interval.

Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan) Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan) Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan) Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan)

Loads a workflow instance from an instance store with specified instance, update map and timeout interval.

Load(WorkflowApplicationInstance) Load(WorkflowApplicationInstance) Load(WorkflowApplicationInstance) 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)

Parameters

Load(Guid) Load(Guid) Load(Guid) 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)

Parameters

instanceId
Guid Guid Guid Guid

A globally unique 128-bit identifier for the workflow instance.

Examples

The following example calls Load to load persisted workflow instance from a SqlWorkflowInstanceStore. 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) Load(WorkflowApplicationInstance, DynamicUpdateMap) Load(WorkflowApplicationInstance, DynamicUpdateMap) 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)

Parameters

Load(WorkflowApplicationInstance, TimeSpan) Load(WorkflowApplicationInstance, TimeSpan) Load(WorkflowApplicationInstance, TimeSpan) 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)

Parameters

timeout
TimeSpan TimeSpan TimeSpan TimeSpan

The interval in which the begin load operation must complete before the operation is canceled.

Load(Guid, TimeSpan) Load(Guid, TimeSpan) Load(Guid, TimeSpan) 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)

Parameters

instanceId
Guid Guid Guid Guid

A globally unique 128-bit identifier for the workflow instance.

timeout
TimeSpan TimeSpan TimeSpan TimeSpan

The interval in which the load operation must complete before the load operation is canceled and a TimeoutException is thrown.

Examples

The following example calls Load to load persisted workflow instance from a SqlWorkflowInstanceStore. 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) Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan) Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan) 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)

Parameters

timeout
TimeSpan TimeSpan TimeSpan TimeSpan

The interval in which the begin load operation must complete before the operation is canceled.

Applies to