WorkflowInvoker.Invoke<TResult> Method (Activity<TResult>)
Invokes a workflow synchronously using the workflow definition passed to the WorkflowInvoker(Activity) constructor.
Assembly: System.Activities (in System.Activities.dll)
The type of the workflow.
A value of type TResult with the result of the execution of the activity.
The following example invokes a workflow consisting of a single Add activity that has two input arguments and since it derives from CodeActivity<int> it has one well-defined Result output argument. When the workflow is invoked, the arguments dictionary is passed which contains the values for each input argument, keyed by argument name. When the call to Invoke returns, the value of the Result output argument is returned. This code example is based off of the Using the WorkflowInvoker Class sample.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2