SqlTrackingWorkflowInstance 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

針對工作流程執行個體的 SqlTrackingService 維護於 SQL 資料庫中之追蹤資料,提供存取權。

public ref class SqlTrackingWorkflowInstance
public 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
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type SqlTrackingWorkflowInstance = class
Public Class SqlTrackingWorkflowInstance
繼承
SqlTrackingWorkflowInstance
屬性

範例

下列程式碼範例示範如何取得所顯示之工作流程清單中所包含的全部 SqlTrackingWorkflowInstance 物件相關資訊。 此程式碼會針對出現在 ListViewItem 變數中的每一個 SqlTrackingWorkflowInstance,建立 displayedWorkflows。 每個 ListViewItem 都包含 WorkflowInstanceInternalIdWorkflowTypeStatus 屬性的字串表示。 而且之後會將項目加入至 workflowStatusList。 此程式碼會使用先前命名的屬性值與 Initialized 屬性的字串版本,建立同時加入至 WorkflowStatusInfo 的新 workflowStatusList 物件。

這個程式碼範例是 Mainform.cs 檔案中<工作流程監視器 SDK>範例的一部分。 如需詳細資訊,請參閱 工作流程監視器

// 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

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

呼叫 SqlTrackingWorkflowInstanceSqlTrackingQuery.TryGetWorkflow 會傳回 SqlTrackingQuery.GetWorkflows 物件,這些物件可讓使用者存取由特定工作流程執行個體的 SqlTrackingService 在 SQL 資料庫中維護的追蹤資料。 SqlTrackingWorkflowInstance 類別會針對其維護集合的屬性,對資料庫的存取進行最佳化。 如需詳細資訊,請參閱Refresh

屬性

ActivityEvents
已淘汰.

取得活動追蹤記錄清單,這些項目已由執行階段追蹤基礎結構為此工作流程執行個體傳送到 SqlTrackingService 資料庫。

AutoRefresh
已淘汰.

取得或設定值,這個值會指定存取此 SqlTrackingWorkflowInstance 的屬性資料時,是否要自動更新資料。

Initialized
已淘汰.

取得或設定 DateTime,這個項目表示工作流程執行階段引擎要求此工作流程執行個體第一個 TrackingChannel 的時間。

InvokedWorkflows
已淘汰.

取得對應已由此工作流程叫用之工作流程的 SqlTrackingWorkflowInstance 物件清單。

InvokingWorkflowInstanceId
已淘汰.

取得或設定叫用此工作流程執行個體之工作流程執行個體的 Guid

Status
已淘汰.

取得工作流程執行個體的狀態。

UserEvents
已淘汰.

取得使用者追蹤記錄清單,這些項目已由執行階段追蹤基礎結構為此工作流程執行個體傳送到 SqlTrackingService 資料庫。

WorkflowDefinition
已淘汰.

取得 Activity,這個項目代表工作流程執行個體目前的工作流程定義。

WorkflowDefinitionUpdated
已淘汰.

取得值,這個值表示自從上次載入 WorkflowDefinition 後,是否已更新工作流程。

WorkflowEvents
已淘汰.

取得工作流程追蹤記錄清單,這些記錄已由執行階段追蹤基礎結構為此工作流程執行個體傳送到 SqlTrackingService

WorkflowInstanceId
已淘汰.

Guid 適用之工作流程執行個體的 SqlTrackingWorkflowInstance

WorkflowInstanceInternalId
已淘汰.

取得或設定可用來在此工作流程執行個體的不同檢視中尋找相關記錄的數字。

WorkflowType
已淘汰.

取得或設定工作流程執行個體的 Type

方法

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
Refresh()
已淘汰.

更新此 SqlTrackingWorkflowInstance 的屬性資料。

ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱