WorkflowApplicationCompletedEventArgs.Outputs プロパティ

定義

ワークフロー インスタンスのルート アクティビティの OutArgument 値を格納しているディクショナリを取得します。この値は、引数名によってキー指定されます。

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ Outputs { System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ get(); };
public System.Collections.Generic.IDictionary<string,object> Outputs { get; }
member this.Outputs : System.Collections.Generic.IDictionary<string, obj>
Public ReadOnly Property Outputs As IDictionary(Of String, Object)

プロパティ値

ワークフロー インスタンスのルート アクティビティの OutArgumentの値を含むディクショナリ。引数名でキー指定されます。

WorkflowApplicationCompletedEventArgs インスタンスの Completed ハンドラーに渡される WorkflowApplication を調べ、ワークフローの完了方法に関する情報を表示するコード サンプルを次に示します。

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);

        // Retrieve the outputs of the workflow.
        foreach (var kvp in e.Outputs)
        {
            Console.WriteLine("Name: {0} - Value {1}",
                kvp.Key, kvp.Value);
        }

        // Outputs can be directly accessed by argument name.
        Console.WriteLine("The winner is {0}.", e.Outputs["Winner"]);
    }
};

適用対象