Udostępnij za pośrednictwem


SqlTrackingWorkflowInstance.WorkflowType Właściwość

Definicja

Pobiera lub ustawia Type wystąpienie przepływu pracy.

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

Wartość właściwości

Wystąpienie Type przepływu pracy.

Przykłady

Poniższy przykład kodu przedstawia sposób uzyskiwania informacji o wszystkich SqlTrackingWorkflowInstance obiektach znajdujących się na liście wyświetlanych przepływów pracy. Kod tworzy ListViewItem element dla każdego SqlTrackingWorkflowInstance znalezionego w zmiennej displayedWorkflows . Każda z nich ListViewItem zawiera reprezentację WorkflowInstanceInternalIdciągu właściwości , WorkflowType i Status . Następnie dodaje element do elementu workflowStatusList. Kod używa wcześniej nazwanych wartości właściwości i wersji Initialized ciągu właściwości, aby utworzyć nowy WorkflowStatusInfo obiekt, który jest również dodawany do klasy workflowStatusList.

Ten przykładowy kod jest częścią przykładowego zestawu SDK monitora przepływu pracy z pliku Mainform.cs. Aby uzyskać więcej informacji, zobacz Monitor przepływu pracy.

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

Dotyczy

Zobacz też