Szerkesztés

Megosztás a következőn keresztül:


SqlTrackingWorkflowInstance.WorkflowInstanceInternalId Property

Definition

Gets or sets a number that can be used to find related records in separate views for this workflow instance.

public:
 property long WorkflowInstanceInternalId { long get(); void set(long value); };
public long WorkflowInstanceInternalId { get; set; }
member this.WorkflowInstanceInternalId : int64 with get, set
Public Property WorkflowInstanceInternalId As Long

Property Value

A number that can be used to find related records in separate views for this workflow instance.

Examples

The following code example shows how to obtain information about all SqlTrackingWorkflowInstance objects contained in a list of displayed workflows. The code creates a ListViewItem for each SqlTrackingWorkflowInstance found in a displayedWorkflows variable. Each ListViewItem contains a string representation of the WorkflowInstanceInternalId, the WorkflowType and Status properties. It then adds the item to a 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.

This code example is part of the Workflow Monitor SDK Sample from the Mainform.cs file. 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

Remarks

This is an internal join operation. WorkflowInstanceInternalId provides a more efficient way to access data for a workflow instance in a SQL database than by using a workflow instance Guid. Use WorkflowInstanceInternalId to find related records for this workflow instance in separate views.

Applies to

See also