SqlTrackingWorkflowInstance SqlTrackingWorkflowInstance SqlTrackingWorkflowInstance SqlTrackingWorkflowInstance Class

Definition

Warning

This API is now obsolete.

Provides access to tracking data maintained in a SQL database by the SqlTrackingService for a workflow instance.

public ref class SqlTrackingWorkflowInstance
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class SqlTrackingWorkflowInstance
type SqlTrackingWorkflowInstance = class
Public Class SqlTrackingWorkflowInstance
Inheritance
SqlTrackingWorkflowInstanceSqlTrackingWorkflowInstanceSqlTrackingWorkflowInstanceSqlTrackingWorkflowInstance
Attributes

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.

// For every workflow instance create a new WorkflowStatusInfo object and store in the workflowStatusList
// Also populate the workflow ListView
foreach (SqlTrackingWorkflowInstance sqlTrackingWorkflowInstance in displayedWorkflows)
{
    ListViewItem listViewItem = new ListViewItem(new string[] {
            sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(),
            sqlTrackingWorkflowInstance.WorkflowType.ToString(),
            sqlTrackingWorkflowInstance.Status.ToString()}, -1);

    listViewWorkflows.Items.Add(listViewItem);

    workflowStatusList.Add(sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(),
            new WorkflowStatusInfo(
                sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(),
                sqlTrackingWorkflowInstance.WorkflowType.ToString(),
                sqlTrackingWorkflowInstance.Status.ToString(),
                sqlTrackingWorkflowInstance.Initialized.ToString(),
                sqlTrackingWorkflowInstance.WorkflowInstanceId,
                listViewItem));
}
' For every workflow instance create a new WorkflowStatusInfo object and store in the workflowStatusList
' Also populate the workflow ListView
' For every workflow instance create a new WorkflowStatusInfo object and store in the workflowStatusList
' Also populate the workflow ListView
For Each sqlTrackingWorkflowInstance As SqlTrackingWorkflowInstance In displayedWorkflows
    Dim listViewItem As ListViewItem = New ListViewItem(New String() { _
        sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(), _
        sqlTrackingWorkflowInstance.WorkflowType.ToString(), _
        sqlTrackingWorkflowInstance.Status.ToString()}, -1)

    listViewWorkflows.Items.Add(listViewItem)

    workflowStatusList.Add(sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(), _
                New WorkflowStatusInfo( _
                    sqlTrackingWorkflowInstance.WorkflowInstanceInternalId.ToString(), _
                    sqlTrackingWorkflowInstance.WorkflowType.ToString(), _
                    sqlTrackingWorkflowInstance.Status.ToString(), _
                    sqlTrackingWorkflowInstance.Initialized.ToString(), _
                    sqlTrackingWorkflowInstance.WorkflowInstanceId, _
                    listViewItem))
Next

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

SqlTrackingWorkflowInstance objects are returned by a call to both SqlTrackingQuery.TryGetWorkflow and SqlTrackingQuery.GetWorkflows and provide access to the tracking data maintained in a SQL database by the SqlTrackingService for a specific workflow instance. The SqlTrackingWorkflowInstance class optimizes its access to the database for its properties, which maintain collections. For more information, see Refresh.

Properties

ActivityEvents ActivityEvents ActivityEvents ActivityEvents

Gets the list of activity tracking records that have been sent for this workflow instance to a SqlTrackingService database by the run-time tracking infrastructure.

AutoRefresh AutoRefresh AutoRefresh AutoRefresh

Gets or sets a value that specifies whether property data for this SqlTrackingWorkflowInstance should be automatically updated when it is accessed.

Initialized Initialized Initialized Initialized

Gets or sets a DateTime that indicates the time at which the first TrackingChannel for this workflow instance was requested by the workflow run-time engine.

InvokedWorkflows InvokedWorkflows InvokedWorkflows InvokedWorkflows

Gets a list of SqlTrackingWorkflowInstance objects that correspond to workflows that have been invoked by this workflow.

InvokingWorkflowInstanceId InvokingWorkflowInstanceId InvokingWorkflowInstanceId InvokingWorkflowInstanceId

Gets or sets the Guid of the workflow instance that invoked this workflow instance.

Status Status Status Status

Gets the status of the workflow instance.

UserEvents UserEvents UserEvents UserEvents

Gets the list of user tracking records that have been sent for this workflow instance to a SqlTrackingService database by the run-time tracking infrastructure.

WorkflowDefinition WorkflowDefinition WorkflowDefinition WorkflowDefinition

Gets an Activity that represents the current workflow definition for the workflow instance.

WorkflowDefinitionUpdated WorkflowDefinitionUpdated WorkflowDefinitionUpdated WorkflowDefinitionUpdated

Gets a value that indicates whether the workflow has been updated since the last time WorkflowDefinition was loaded.

WorkflowEvents WorkflowEvents WorkflowEvents WorkflowEvents

Gets the list of workflow tracking records that have been sent for this workflow instance to a SqlTrackingService database by the run-time tracking infrastructure.

WorkflowInstanceId WorkflowInstanceId WorkflowInstanceId WorkflowInstanceId

The Guid of the workflow instance for which this SqlTrackingWorkflowInstance applies.

WorkflowInstanceInternalId WorkflowInstanceInternalId WorkflowInstanceInternalId WorkflowInstanceInternalId

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

WorkflowType WorkflowType WorkflowType WorkflowType

Gets or sets the Type of the workflow instance.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Refresh() Refresh() Refresh() Refresh()

Updates the property data for this SqlTrackingWorkflowInstance.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also