WorkflowInvoker WorkflowInvoker WorkflowInvoker WorkflowInvoker Class

Definition

Provides a means for invoking a workflow as if it were a method call.

public ref class WorkflowInvoker sealed
public sealed class WorkflowInvoker
type WorkflowInvoker = class
Public NotInheritable Class WorkflowInvoker
Inheritance
WorkflowInvokerWorkflowInvokerWorkflowInvokerWorkflowInvoker

Examples

The following example synchronously invokes a workflow consisting of a single WriteLine activity using WorkflowInvoker.

Activity wf = new WriteLine
{
    Text = "Hello World."
};

WorkflowInvoker.Invoke(wf);

Remarks

WorkflowInvoker contains both instance and static methods for invoking workflows synchronously, and instance methods for invoking workflows asynchronously.

WorkflowInvoker does not allow instance control such as persisting, unloading, or resuming bookmarks. If instance control is desired, use WorkflowApplication instead.

To execute workflows synchronously with no instance control, call the Invoke method. To execute a workflow asynchronously with no instance control, use the BeginInvoke and EndInvoke method pairs, or the InvokeAsync method.

Constructors

WorkflowInvoker(Activity) WorkflowInvoker(Activity) WorkflowInvoker(Activity) WorkflowInvoker(Activity)

Initializes a new instance of the WorkflowInvoker class.

Properties

Extensions Extensions Extensions Extensions

Gets the Collection<T> of extensions that are available to workflows invoked by a WorkflowInvoker instance.

Methods

BeginInvoke(AsyncCallback, Object) BeginInvoke(AsyncCallback, Object) BeginInvoke(AsyncCallback, Object) BeginInvoke(AsyncCallback, Object)

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

BeginInvoke(IDictionary<String,Object>, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, AsyncCallback, Object)

Invokes a workflow asynchronously using the specified IDictionary<TKey,TValue> of input parameters, AsyncCallback, and user-provided state.

BeginInvoke(IDictionary<String,Object>, TimeSpan, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, TimeSpan, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, TimeSpan, AsyncCallback, Object) BeginInvoke(IDictionary<String,Object>, TimeSpan, AsyncCallback, Object)

Invokes a workflow asynchronously using the specified IDictionary<TKey,TValue> of input parameters, time-out interval, AsyncCallback, and user-provided state.

BeginInvoke(TimeSpan, AsyncCallback, Object) BeginInvoke(TimeSpan, AsyncCallback, Object) BeginInvoke(TimeSpan, AsyncCallback, Object) BeginInvoke(TimeSpan, AsyncCallback, Object)

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

CancelAsync(Object) CancelAsync(Object) CancelAsync(Object) CancelAsync(Object)

Attempts to cancel the workflow that was invoked with the specified userState.

EndInvoke(IAsyncResult) EndInvoke(IAsyncResult) EndInvoke(IAsyncResult) EndInvoke(IAsyncResult)

Returns the results of a workflow that was invoked using one of the BeginInvoke overloads.

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

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
Invoke() Invoke() Invoke() Invoke()

Invokes a workflow synchronously using the workflow definition passed to the WorkflowInvoker(Activity) constructor.

Invoke(Activity) Invoke(Activity) Invoke(Activity) Invoke(Activity)

Invokes a workflow synchronously using the specified workflow definition.

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

Invokes a workflow synchronously using the specified workflow definition and IDictionary<TKey,TValue> of input parameters.

Invoke(Activity, IDictionary<String,Object>, TimeSpan) Invoke(Activity, IDictionary<String,Object>, TimeSpan) Invoke(Activity, IDictionary<String,Object>, TimeSpan) Invoke(Activity, IDictionary<String,Object>, TimeSpan)

Invokes a workflow synchronously using the specified workflow definition, IDictionary<TKey,TValue> of input parameters, and time-out interval.

Invoke(Activity, TimeSpan) Invoke(Activity, TimeSpan) Invoke(Activity, TimeSpan) Invoke(Activity, TimeSpan)

Invokes a workflow synchronously using the specified workflow definition and time-out interval.

Invoke(IDictionary<String,Object>) Invoke(IDictionary<String,Object>) Invoke(IDictionary<String,Object>) Invoke(IDictionary<String,Object>)

Invokes the activity passed to the WorkflowInvoker(Activity) constructor synchronously with the specified IDictionary<TKey,TValue> of input parameters.

Invoke(IDictionary<String,Object>, TimeSpan) Invoke(IDictionary<String,Object>, TimeSpan) Invoke(IDictionary<String,Object>, TimeSpan) Invoke(IDictionary<String,Object>, TimeSpan)

Invokes the activity passed to the WorkflowInvoker(Activity) constructor synchronously with the specified IDictionary<TKey,TValue> of input parameters and the specified time-out interval.

Invoke(TimeSpan) Invoke(TimeSpan) Invoke(TimeSpan) Invoke(TimeSpan)

Invokes a workflow synchronously with the specified time-out interval.

Invoke<TResult>(Activity<TResult>) Invoke<TResult>(Activity<TResult>) Invoke<TResult>(Activity<TResult>) Invoke<TResult>(Activity<TResult>)

Invokes a workflow synchronously using the workflow definition passed to the WorkflowInvoker(Activity) constructor.

Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>)

Invokes a workflow synchronously using the specified workflow definition and IDictionary<TKey,TValue> of input parameters.

Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, IDictionary<String,Object>, TimeSpan)

Invokes a workflow synchronously using the specified workflow definition, IDictionary<TKey,TValue> of input parameters, IDictionary<TKey,TValue> of additional output parameters, and time-out interval.

Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, TimeSpan) Invoke<TResult>(Activity<TResult>, IDictionary<String,Object>, TimeSpan)

Invokes a workflow synchronously using the specified workflow definition, IDictionary<TKey,TValue> of input parameters, and time-out interval.

InvokeAsync() InvokeAsync() InvokeAsync() InvokeAsync()

Invokes a workflow asynchronously.

InvokeAsync(IDictionary<String,Object>) InvokeAsync(IDictionary<String,Object>) InvokeAsync(IDictionary<String,Object>) InvokeAsync(IDictionary<String,Object>)

Invokes a workflow asynchronously using the specified IDictionary<TKey,TValue> of input parameters.

InvokeAsync(IDictionary<String,Object>, Object) InvokeAsync(IDictionary<String,Object>, Object) InvokeAsync(IDictionary<String,Object>, Object) InvokeAsync(IDictionary<String,Object>, Object)

Invokes a workflow asynchronously using the specified IDictionary<TKey,TValue> of input parameters and a unique identifier.

InvokeAsync(IDictionary<String,Object>, TimeSpan) InvokeAsync(IDictionary<String,Object>, TimeSpan) InvokeAsync(IDictionary<String,Object>, TimeSpan) InvokeAsync(IDictionary<String,Object>, TimeSpan)

Invokes a workflow asynchronously with the specified IDictionary<TKey,TValue> of input parameters and the specified time-out interval.

InvokeAsync(IDictionary<String,Object>, TimeSpan, Object) InvokeAsync(IDictionary<String,Object>, TimeSpan, Object) InvokeAsync(IDictionary<String,Object>, TimeSpan, Object) InvokeAsync(IDictionary<String,Object>, TimeSpan, Object)

Invokes a workflow asynchronously with the specified IDictionary<TKey,TValue> of input parameters, the specified time-out interval, and a unique identifier.

InvokeAsync(Object) InvokeAsync(Object) InvokeAsync(Object) InvokeAsync(Object)

Invokes a workflow asynchronously using the specified unique identifier.

InvokeAsync(TimeSpan) InvokeAsync(TimeSpan) InvokeAsync(TimeSpan) InvokeAsync(TimeSpan)

Invokes a workflow asynchronously with the specified time-out interval.

InvokeAsync(TimeSpan, Object) InvokeAsync(TimeSpan, Object) InvokeAsync(TimeSpan, Object) InvokeAsync(TimeSpan, Object)

Invokes a workflow asynchronously with the specified time-out interval and a unique identifier.

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

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

InvokeCompleted InvokeCompleted InvokeCompleted InvokeCompleted

Occurs when the workflow invoked by one of the InvokeAsync overloads is completed or canceled.

Applies to