SqlTrackingWorkflowInstance.Status Propriedade
Definição
Obtém o status da instância de fluxo de trabalho.Gets the status of the workflow instance.
public:
property System::Workflow::Runtime::WorkflowStatus Status { System::Workflow::Runtime::WorkflowStatus get(); void set(System::Workflow::Runtime::WorkflowStatus value); };
public System.Workflow.Runtime.WorkflowStatus Status { get; set; }
member this.Status : System.Workflow.Runtime.WorkflowStatus with get, set
Public Property Status As WorkflowStatus
Valor da propriedade
Um WorkflowStatus que representa o status atual da instância de fluxo de trabalho.A WorkflowStatus that represents the current status of the workflow instance.
Exemplos
O exemplo de código a seguir mostra como obter informações sobre todos os SqlTrackingWorkflowInstance objetos contidos em uma lista de fluxos de trabalho exibidos.The following code example shows how to obtain information about all SqlTrackingWorkflowInstance objects contained in a list of displayed workflows. O código cria um ListViewItem para cada SqlTrackingWorkflowInstance encontrado em uma displayedWorkflows variável.The code creates a ListViewItem for each SqlTrackingWorkflowInstance found in a displayedWorkflows variable. Cada ListViewItem contém uma representação de cadeia de caracteres das WorkflowInstanceInternalId WorkflowType Status Propriedades e.Each ListViewItem contains a string representation of the WorkflowInstanceInternalId, the WorkflowType and Status properties. Em seguida, ele adiciona o item a um workflowStatusList .It then adds the item to a workflowStatusList. O código usa os valores de propriedade nomeados anteriormente e uma versão de cadeia de caracteres da Initialized propriedade para criar um novo WorkflowStatusInfo objeto que também é adicionado ao workflowStatusList .The code uses the previously named property values and a string version of the Initialized property to create a new WorkflowStatusInfo object that is also added to the workflowStatusList.
Este exemplo de código faz parte do exemplo de SDK do monitor de fluxo de trabalho do arquivo MainForm. cs.This code example is part of the Workflow Monitor SDK Sample from the Mainform.cs file. Para obter mais informações, consulte Monitor de fluxo de trabalho.For more information, see Workflow Monitor.
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
Comentários
Status é determinado com base nos dados de rastreamento da instância de fluxo de trabalho, especificamente nos registros de rastreamento de fluxo de trabalho enviados pela infraestrutura de acompanhamento de tempo de execução; Portanto, Status depende, em parte, dos WorkflowTrackPoint objetos no TrackingProfile para a instância de fluxo de trabalho.Status is determined based on the tracking data for the workflow instance, specifically on the workflow tracking records sent by the run-time tracking infrastructure; therefore Status depends, in part, on the WorkflowTrackPoint objects in the TrackingProfile for the workflow instance. WorkflowTrackingRecord.TrackingWorkflowEvent em cada WorkflowTrackingRecord um deles é mapeado para um dos WorkflowStatus valores.WorkflowTrackingRecord.TrackingWorkflowEvent in each WorkflowTrackingRecord maps to one of the WorkflowStatus values. Se nenhum registro de rastreamento de fluxo de trabalho tiver sido enviado pela infraestrutura de acompanhamento de tempo de execução para essa instância de fluxo de trabalho, Status será Created .If no workflow tracking records have been sent by the run-time tracking infrastructure for this workflow instance, Status is Created.