WorkflowApplication WorkflowApplication WorkflowApplication WorkflowApplication Class

Definition

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
Inheritance
WorkflowApplicationWorkflowApplicationWorkflowApplicationWorkflowApplication

Examples

The following example hosts a workflow using WorkflowApplication. 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();

Remarks

The WorkflowApplication class provides a host for a single workflow instance. It is a proxy to the actual workflow instance that is managed by the workflow runtime. 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.

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.

Constructors

WorkflowApplication(Activity) WorkflowApplication(Activity) WorkflowApplication(Activity) WorkflowApplication(Activity)

Creates a new instance of the WorkflowApplication class with the specified workflow definition.

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

Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values.

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

Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values, and definition identity.

WorkflowApplication(Activity, WorkflowIdentity) WorkflowApplication(Activity, WorkflowIdentity) WorkflowApplication(Activity, WorkflowIdentity) WorkflowApplication(Activity, WorkflowIdentity)

Creates a new instance of the WorkflowApplication class with the specified workflow definition and definition identity.

Properties

Aborted Aborted Aborted Aborted

Gets or sets the Action<T> that is invoked when the workflow instance is aborted.

Completed Completed Completed Completed

Gets or sets the Action<T> that is invoked when the workflow instance completes.

Controller Controller Controller Controller

Gets the WorkflowInstance.WorkflowInstanceControl instance for this WorkflowInstance.

(Inherited from WorkflowInstance)
DefinitionIdentity DefinitionIdentity DefinitionIdentity DefinitionIdentity

Gets or sets the definition identity of WorkflowInstance.

(Inherited from WorkflowInstance)
Extensions Extensions Extensions Extensions

Gets the collection of extensions for the current workflow instance.

HostEnvironment HostEnvironment HostEnvironment HostEnvironment

Gets or sets the root environment for the workflow instance’s arguments and variables.

(Inherited from WorkflowInstance)
Id Id Id Id

Gets the 128-bit GUID identifier of the current workflow application instance.

Idle Idle Idle Idle

Gets or sets the Action<T> that is invoked when the current workflow instance becomes idle.

InstanceStore InstanceStore InstanceStore InstanceStore

Gets or sets an object that provides access to the persisted state of the current instance of the workflow application.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value that indicates whether the workflow instance has been initialized.

(Inherited from WorkflowInstance)
OnUnhandledException OnUnhandledException OnUnhandledException OnUnhandledException

Gets or sets the Func<T,TResult> that is invoked when the current workflow instance encounters an unhandled exception.

PersistableIdle PersistableIdle PersistableIdle PersistableIdle

Gets or sets the delegate that is invoked when the current workflow instance is idle and can be persisted.

SupportsInstanceKeys SupportsInstanceKeys SupportsInstanceKeys SupportsInstanceKeys

Gets a value that indicates whether the host supports the association of InstanceKeys with a run-time instance.

(Inherited from WorkflowInstance)
SynchronizationContext SynchronizationContext SynchronizationContext SynchronizationContext

Gets or sets the SynchronizationContext used for scheduling the workflow instance.

(Inherited from WorkflowInstance)
Unloaded Unloaded Unloaded Unloaded

Gets or sets the Action<T> that is invoked when the current workflow unloads.

WorkflowDefinition WorkflowDefinition WorkflowDefinition WorkflowDefinition

Gets the workflow definition of the workflow instance.

(Inherited from WorkflowInstance)

Methods

Abort() Abort() Abort() Abort()

Notifies the workflow runtime that this workflow instance should abort.

Abort(String) Abort(String) Abort(String) Abort(String)

Notifies the workflow runtime that this workflow instance should abort for the specified reason.

AddInitialInstanceValues(IDictionary<XName,Object>) AddInitialInstanceValues(IDictionary<XName,Object>) AddInitialInstanceValues(IDictionary<XName,Object>) AddInitialInstanceValues(IDictionary<XName,Object>)

Specifies instance metadata values that are included with the first persistence of a new instance.

BeginCancel(AsyncCallback, Object) BeginCancel(AsyncCallback, Object) BeginCancel(AsyncCallback, Object) BeginCancel(AsyncCallback, Object)

Cancels a workflow instance asynchronously using the specified AsyncCallback and user-provided state.

BeginCancel(TimeSpan, AsyncCallback, Object) BeginCancel(TimeSpan, AsyncCallback, Object) BeginCancel(TimeSpan, AsyncCallback, Object) BeginCancel(TimeSpan, AsyncCallback, Object)

Cancels a workflow instance asynchronously using the specified time-out interval, AsyncCallback, and user-provided state.

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

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) BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan, AsyncCallback, Object) BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan, AsyncCallback, Object) BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan, AsyncCallback, Object)

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) BeginDeleteDefaultInstanceOwner(InstanceStore, AsyncCallback, Object) BeginDeleteDefaultInstanceOwner(InstanceStore, AsyncCallback, Object) BeginDeleteDefaultInstanceOwner(InstanceStore, AsyncCallback, Object)

Deletes a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object) BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object) BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object) BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object)

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) BeginFlushTrackingRecords(TimeSpan, AsyncCallback, Object) BeginFlushTrackingRecords(TimeSpan, AsyncCallback, Object) BeginFlushTrackingRecords(TimeSpan, AsyncCallback, Object)

Called by the workflow runtime to begin sending pending tracking records to tracking participants asynchronously.

(Inherited from WorkflowInstance)
BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object) BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object) BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object) BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object)

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) BeginGetInstance(Guid, InstanceStore, TimeSpan, AsyncCallback, Object) BeginGetInstance(Guid, InstanceStore, TimeSpan, AsyncCallback, Object) BeginGetInstance(Guid, InstanceStore, TimeSpan, AsyncCallback, Object)

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) BeginGetRunnableInstance(InstanceStore, AsyncCallback, Object) BeginGetRunnableInstance(InstanceStore, AsyncCallback, Object) BeginGetRunnableInstance(InstanceStore, AsyncCallback, Object)

Retrieves a runnable instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object) BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object) BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object) BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object)

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) BeginLoad(Guid, AsyncCallback, Object) BeginLoad(Guid, AsyncCallback, Object) 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) BeginLoad(Guid, TimeSpan, AsyncCallback, Object) BeginLoad(Guid, TimeSpan, AsyncCallback, Object) 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) BeginLoad(WorkflowApplicationInstance, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, AsyncCallback, Object)

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) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, AsyncCallback, Object)

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) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan, AsyncCallback, Object)

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) BeginLoad(WorkflowApplicationInstance, TimeSpan, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, TimeSpan, AsyncCallback, Object) BeginLoad(WorkflowApplicationInstance, TimeSpan, AsyncCallback, Object)

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) BeginLoadRunnableInstance(AsyncCallback, Object) BeginLoadRunnableInstance(AsyncCallback, Object) BeginLoadRunnableInstance(AsyncCallback, Object)

Initiates an operation to load a runnable workflow instance from the InstanceStore.

BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object) BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object) BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object) BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object)

Initiates an operation to load a runnable workflow instance from the InstanceStore using the specified time-out interval.

BeginPersist(AsyncCallback, Object) BeginPersist(AsyncCallback, Object) BeginPersist(AsyncCallback, Object) 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) BeginPersist(TimeSpan, AsyncCallback, Object) BeginPersist(TimeSpan, AsyncCallback, Object) 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) BeginResumeBookmark(Bookmark, Object, AsyncCallback, Object) BeginResumeBookmark(Bookmark, Object, AsyncCallback, Object) 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) BeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object) BeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object) 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) BeginResumeBookmark(String, Object, AsyncCallback, Object) BeginResumeBookmark(String, Object, AsyncCallback, Object) 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) BeginResumeBookmark(String, Object, TimeSpan, AsyncCallback, Object) BeginResumeBookmark(String, Object, TimeSpan, AsyncCallback, Object) 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) BeginRun(AsyncCallback, Object) BeginRun(AsyncCallback, Object) BeginRun(AsyncCallback, Object)

Starts or resumes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginRun(TimeSpan, AsyncCallback, Object) BeginRun(TimeSpan, AsyncCallback, Object) BeginRun(TimeSpan, AsyncCallback, Object) 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) BeginTerminate(Exception, AsyncCallback, Object) BeginTerminate(Exception, AsyncCallback, Object) BeginTerminate(Exception, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified exception, callback method, and user-provided state.

BeginTerminate(Exception, TimeSpan, AsyncCallback, Object) BeginTerminate(Exception, TimeSpan, AsyncCallback, Object) BeginTerminate(Exception, TimeSpan, AsyncCallback, Object) 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) BeginTerminate(String, AsyncCallback, Object) BeginTerminate(String, AsyncCallback, Object) 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) BeginTerminate(String, TimeSpan, AsyncCallback, Object) BeginTerminate(String, TimeSpan, AsyncCallback, Object) 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) BeginUnload(AsyncCallback, Object) BeginUnload(AsyncCallback, Object) BeginUnload(AsyncCallback, Object)

Persists and disposes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginUnload(TimeSpan, AsyncCallback, Object) BeginUnload(TimeSpan, AsyncCallback, Object) BeginUnload(TimeSpan, AsyncCallback, Object) BeginUnload(TimeSpan, AsyncCallback, Object)

Persists and disposes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

Cancel() Cancel() Cancel() Cancel()

Cancels the workflow instance.

Cancel(TimeSpan) Cancel(TimeSpan) Cancel(TimeSpan) Cancel(TimeSpan)

Cancels the workflow instance using the specified time-out interval.

CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter) CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter) CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter) 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) CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan) CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan) 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) DeleteDefaultInstanceOwner(InstanceStore) DeleteDefaultInstanceOwner(InstanceStore) DeleteDefaultInstanceOwner(InstanceStore)

Deletes a default instance owner for the workflow with specified instance store.

DeleteDefaultInstanceOwner(InstanceStore, TimeSpan) DeleteDefaultInstanceOwner(InstanceStore, TimeSpan) DeleteDefaultInstanceOwner(InstanceStore, TimeSpan) DeleteDefaultInstanceOwner(InstanceStore, TimeSpan)

Deletes a default instance owner for the workflow with specified instance store and timeout interval..

DisposeExtensions() DisposeExtensions() DisposeExtensions() DisposeExtensions()

Calls Dispose() on all extensions that implement IDisposable.

(Inherited from WorkflowInstance)
EndCancel(IAsyncResult) EndCancel(IAsyncResult) EndCancel(IAsyncResult) EndCancel(IAsyncResult)

Waits for the pending asynchronous cancel operation to complete.

EndCreateDefaultInstanceOwner(IAsyncResult) EndCreateDefaultInstanceOwner(IAsyncResult) EndCreateDefaultInstanceOwner(IAsyncResult) EndCreateDefaultInstanceOwner(IAsyncResult)

Waits for the creation of default instance owner to complete.

EndDeleteDefaultInstanceOwner(IAsyncResult) EndDeleteDefaultInstanceOwner(IAsyncResult) EndDeleteDefaultInstanceOwner(IAsyncResult) EndDeleteDefaultInstanceOwner(IAsyncResult)

Waits for the deletion of default instance owner to complete.

EndFlushTrackingRecords(IAsyncResult) EndFlushTrackingRecords(IAsyncResult) EndFlushTrackingRecords(IAsyncResult) EndFlushTrackingRecords(IAsyncResult)

Called by the workflow runtime to end the track operation.

(Inherited from WorkflowInstance)
EndGetInstance(IAsyncResult) EndGetInstance(IAsyncResult) EndGetInstance(IAsyncResult) EndGetInstance(IAsyncResult)

Waits for the instance retrieval to complete.

EndGetRunnableInstance(IAsyncResult) EndGetRunnableInstance(IAsyncResult) EndGetRunnableInstance(IAsyncResult) EndGetRunnableInstance(IAsyncResult)

Waits for the asynchronous retrieval of runnable instance operation to complete.

EndLoad(IAsyncResult) EndLoad(IAsyncResult) EndLoad(IAsyncResult) EndLoad(IAsyncResult)

Waits for the pending asynchronous load operation to complete.

EndLoadRunnableInstance(IAsyncResult) EndLoadRunnableInstance(IAsyncResult) EndLoadRunnableInstance(IAsyncResult) EndLoadRunnableInstance(IAsyncResult)

Waits for the asynchronous load runnable instance operation to complete.

EndPersist(IAsyncResult) EndPersist(IAsyncResult) EndPersist(IAsyncResult) EndPersist(IAsyncResult)

Waits for the pending asynchronous persist operation to complete.

EndResumeBookmark(IAsyncResult) EndResumeBookmark(IAsyncResult) EndResumeBookmark(IAsyncResult) EndResumeBookmark(IAsyncResult)

Waits for a bookmark resume operation to complete.

EndRun(IAsyncResult) EndRun(IAsyncResult) EndRun(IAsyncResult) EndRun(IAsyncResult)

Waits for the pending asynchronous run operation to complete.

EndTerminate(IAsyncResult) EndTerminate(IAsyncResult) EndTerminate(IAsyncResult) EndTerminate(IAsyncResult)

Waits for the pending asynchronous terminate operation to complete.

EndUnload(IAsyncResult) EndUnload(IAsyncResult) EndUnload(IAsyncResult) EndUnload(IAsyncResult)

Waits for the pending asynchronous unload operation to complete.

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

Determines whether the specified object is equal to the current object.

(Inherited from Object)
FlushTrackingRecords(TimeSpan) FlushTrackingRecords(TimeSpan) FlushTrackingRecords(TimeSpan) FlushTrackingRecords(TimeSpan)

Called by the workflow runtime to send pending tracking records to tracking participants.

(Inherited from WorkflowInstance)
GetBookmarks() GetBookmarks() GetBookmarks() GetBookmarks()

Returns the collection of bookmarks for the workflow instance.

GetBookmarks(TimeSpan) GetBookmarks(TimeSpan) GetBookmarks(TimeSpan) GetBookmarks(TimeSpan)

Returns the collection of bookmarks for the workflow instance using the specified time-out interval.

GetExtension<T>() GetExtension<T>() GetExtension<T>() GetExtension<T>()

Returns an extension of the specified type.

(Inherited from WorkflowInstance)
GetExtensions<T>() GetExtensions<T>() GetExtensions<T>() GetExtensions<T>()

Returns all extensions found for the specified type.

(Inherited from WorkflowInstance)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetInstance(Guid, InstanceStore) GetInstance(Guid, InstanceStore) GetInstance(Guid, InstanceStore) GetInstance(Guid, InstanceStore)

Retrieves the workflow instance using specified instance identifier and instance store.

GetInstance(Guid, InstanceStore, TimeSpan) GetInstance(Guid, InstanceStore, TimeSpan) GetInstance(Guid, InstanceStore, TimeSpan) GetInstance(Guid, InstanceStore, TimeSpan)

Retrieves the workflow instance using specified instance identifier, instance store and timeout interval.

GetRunnableInstance(InstanceStore) GetRunnableInstance(InstanceStore) GetRunnableInstance(InstanceStore) GetRunnableInstance(InstanceStore)

Retrieves the runnable instance of the workflow with specified instance store.

GetRunnableInstance(InstanceStore, TimeSpan) GetRunnableInstance(InstanceStore, TimeSpan) GetRunnableInstance(InstanceStore, TimeSpan) GetRunnableInstance(InstanceStore, TimeSpan)

Retrieves the runnable instance of the workflow with specified instance store and timeout interval.

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

Gets the Type of the current instance.

(Inherited from Object)
Initialize(IDictionary<String,Object>, IList<Handle>) Initialize(IDictionary<String,Object>, IList<Handle>) Initialize(IDictionary<String,Object>, IList<Handle>) Initialize(IDictionary<String,Object>, IList<Handle>)

Called by the host to initialize the workflow instance with the argument values and execution properties.

(Inherited from WorkflowInstance)
Initialize(Object) Initialize(Object) Initialize(Object) Initialize(Object)

Called by the host to initialize the workflow instance with the workflow run-time state.

(Inherited from WorkflowInstance)
Initialize(Object, DynamicUpdateMap) Initialize(Object, DynamicUpdateMap) Initialize(Object, DynamicUpdateMap) Initialize(Object, DynamicUpdateMap)

Called by the host to initialize the workflow instance with the workflow run-time state and update map.

(Inherited from WorkflowInstance)
Load(Guid) Load(Guid) Load(Guid) Load(Guid)

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

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

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

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

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

LoadRunnableInstance() LoadRunnableInstance() LoadRunnableInstance() LoadRunnableInstance()

Loads a runnable workflow instance from the InstanceStore.

LoadRunnableInstance(TimeSpan) LoadRunnableInstance(TimeSpan) LoadRunnableInstance(TimeSpan) LoadRunnableInstance(TimeSpan)

Loads a runnable workflow instance from the InstanceStore using the specified time-out interval.

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

Creates a shallow copy of the current Object.

(Inherited from Object)
OnBeginAssociateKeys(ICollection<InstanceKey>, AsyncCallback, Object) OnBeginAssociateKeys(ICollection<InstanceKey>, AsyncCallback, Object) OnBeginAssociateKeys(ICollection<InstanceKey>, AsyncCallback, 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.

(Inherited from WorkflowInstance)
OnBeginFlushTrackingRecords(AsyncCallback, Object) OnBeginFlushTrackingRecords(AsyncCallback, Object) OnBeginFlushTrackingRecords(AsyncCallback, Object) OnBeginFlushTrackingRecords(AsyncCallback, Object)

Asynchronous call to ask host to flush pending tracking records to tracking participants.

(Inherited from WorkflowInstance)
OnBeginPersist(AsyncCallback, Object) OnBeginPersist(AsyncCallback, Object) OnBeginPersist(AsyncCallback, Object) OnBeginPersist(AsyncCallback, Object)

Asynchronous call to ask the host to persist the workflow.

(Inherited from WorkflowInstance)
OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object) OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object) OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object) OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object)

Called by the workflow runtime to notify the host that a resume bookmark operation is beginning.

(Inherited from WorkflowInstance)
OnDisassociateKeys(ICollection<InstanceKey>) OnDisassociateKeys(ICollection<InstanceKey>) OnDisassociateKeys(ICollection<InstanceKey>) 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.

(Inherited from WorkflowInstance)
OnEndAssociateKeys(IAsyncResult) OnEndAssociateKeys(IAsyncResult) OnEndAssociateKeys(IAsyncResult) OnEndAssociateKeys(IAsyncResult)

Called by the workflow runtime to notify the host that an associate keys operation is complete.

(Inherited from WorkflowInstance)
OnEndFlushTrackingRecords(IAsyncResult) OnEndFlushTrackingRecords(IAsyncResult) OnEndFlushTrackingRecords(IAsyncResult) OnEndFlushTrackingRecords(IAsyncResult)

Called by the workflow runtime to notify the host when the flush tracking records operation is complete.

(Inherited from WorkflowInstance)
OnEndPersist(IAsyncResult) OnEndPersist(IAsyncResult) OnEndPersist(IAsyncResult) OnEndPersist(IAsyncResult)

Called by the workflow runtime to notify the host that a persist operation is complete.

(Inherited from WorkflowInstance)
OnEndResumeBookmark(IAsyncResult) OnEndResumeBookmark(IAsyncResult) OnEndResumeBookmark(IAsyncResult) OnEndResumeBookmark(IAsyncResult)

Called by the workflow runtime to notify the host that a resume bookmark operation is complete.

(Inherited from WorkflowInstance)
OnNotifyPaused() OnNotifyPaused() OnNotifyPaused() OnNotifyPaused()

Called by the workflow runtime to notify the host that the workflow instance has transitioned from the running state to the paused state.

(Inherited from WorkflowInstance)
OnNotifyUnhandledException(Exception, Activity, String) OnNotifyUnhandledException(Exception, Activity, String) OnNotifyUnhandledException(Exception, Activity, String) OnNotifyUnhandledException(Exception, Activity, String)

Called by the workflow runtime to notify the host an unhandled exception has occurred in the workflow instance.

(Inherited from WorkflowInstance)
OnRequestAbort(Exception) OnRequestAbort(Exception) OnRequestAbort(Exception) OnRequestAbort(Exception)

Called by the workflow runtime to notify the host that an abort operation has been requested for the workflow instance.

(Inherited from WorkflowInstance)
Persist() Persist() Persist() Persist()

Persists a workflow instance to an instance store.

Persist(TimeSpan) Persist(TimeSpan) Persist(TimeSpan) Persist(TimeSpan)

Persists a workflow instance to an instance store using the specified time-out interval.

RegisterExtensionManager(WorkflowInstanceExtensionManager) RegisterExtensionManager(WorkflowInstanceExtensionManager) RegisterExtensionManager(WorkflowInstanceExtensionManager) 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.

(Inherited from WorkflowInstance)
ResumeBookmark(Bookmark, Object) ResumeBookmark(Bookmark, Object) ResumeBookmark(Bookmark, Object) 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) ResumeBookmark(Bookmark, Object, TimeSpan) ResumeBookmark(Bookmark, Object, TimeSpan) 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) ResumeBookmark(String, Object) ResumeBookmark(String, Object) 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) ResumeBookmark(String, Object, TimeSpan) ResumeBookmark(String, Object, TimeSpan) 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() Run() Run() Run()

Begins or resumes the execution of a workflow instance.

Run(TimeSpan) Run(TimeSpan) Run(TimeSpan) Run(TimeSpan)

Begins or resumes the execution of a workflow instance using the specified time-out interval.

Terminate(Exception) Terminate(Exception) Terminate(Exception) Terminate(Exception)

Terminates a workflow instance using the specified exception.

Terminate(Exception, TimeSpan) Terminate(Exception, TimeSpan) Terminate(Exception, TimeSpan) Terminate(Exception, TimeSpan)

Terminates a workflow instance using the specified exception and time-out interval.

Terminate(String) Terminate(String) Terminate(String) Terminate(String)

Terminates a workflow instance using the specified error message.

Terminate(String, TimeSpan) Terminate(String, TimeSpan) Terminate(String, TimeSpan) Terminate(String, TimeSpan)

Terminates a workflow instance using the specified error message and time-out interval.

ThrowIfReadOnly() ThrowIfReadOnly() ThrowIfReadOnly() ThrowIfReadOnly()

Throws an InvalidOperationException if the workflow instance has been initialized, as determined by IsReadOnly.

(Inherited from WorkflowInstance)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
Unload() Unload() Unload() Unload()

Persists and unloads a workflow instance.

Unload(TimeSpan) Unload(TimeSpan) Unload(TimeSpan) Unload(TimeSpan)

Persists and unloads a workflow instance using the specified time-out interval.

Applies to