共用方式為


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

適用於

另請參閱