SqlTrackingWorkflowInstance.WorkflowInstanceId 属性

定义

为其应用此 Guid 的工作流实例的 SqlTrackingWorkflowInstance

public:
 property Guid WorkflowInstanceId { Guid get(); void set(Guid value); };
public Guid WorkflowInstanceId { get; set; }
member this.WorkflowInstanceId : Guid with get, set
Public Property WorkflowInstanceId As Guid

属性值

为其应用此 Guid 的工作流实例的 SqlTrackingWorkflowInstance

示例

下面的代码示例演示如何获取有关所显示工作流的列表中包含的所有 SqlTrackingWorkflowInstance 对象的信息。 代码为 ListViewItem 变量中的每个 SqlTrackingWorkflowInstance 创建一个 displayedWorkflows。 每个 ListViewItem 都包含 WorkflowInstanceInternalIdWorkflowTypeStatus 属性的字符串表示形式。 然后,它将该项添加到 workflowStatusList。 代码使用以前命名的属性值和 Initialized 属性的字符串版本来创建同样会添加到 WorkflowStatusInfo 的新 workflowStatusList 对象。

此代码示例摘自 Mainform.cs 文件中的工作流监视器 SDK 示例。 有关详细信息,请参阅 工作流监视器

static void WriteTerminatedEventArgs(string eventDescription, TrackingWorkflowTerminatedEventArgs terminatedEventArgs, DateTime eventDataTime)
{
    Console.WriteLine("\nTerminated Event Arguments Read From Tracking Database:\n");
    Console.WriteLine("EventDataTime: " + eventDataTime.ToString());
    Console.WriteLine("EventDescription: " + eventDescription);
    if (null != terminatedEventArgs.Exception)
    {
        Console.WriteLine("TerminatedEventArgs Exception Message: " + terminatedEventArgs.Exception.Message.ToString());
    }
}
Shared Sub WriteTerminatedEventArgs(ByVal eventDescription As String, ByVal terminatedEventArgs As TrackingWorkflowTerminatedEventArgs, ByVal eventDataTime As DateTime)
    Console.WriteLine(vbCrLf + "Terminated Event Arguments Read From Tracking Database:")
    Console.WriteLine("EventDataTime: " + eventDataTime.ToString(CultureInfo.CurrentCulture))
    Console.WriteLine("EventDescription: " + eventDescription)
    If terminatedEventArgs.Exception IsNot Nothing Then
        Console.WriteLine("TerminatedEventArgs Exception Message: " + terminatedEventArgs.Exception.Message.ToString())
    End If
End Sub

适用于

另请参阅