zoukankan      html  css  js  c++  java
  • Tracking_SqlTrackingQuery(2)

      WorkFlow状态对象:WorkflowTrackingRecord

    WorkFlow状态对象WorkflowTrackingRecord以集合成员的方式存于SqlTrackingWorkflowInstanceWorkflowEvents集合中

     无须在WorkflowRuntime宿主程序中

            Shared Sub 得到实例运行状况列表(ByVal 实例Id As Guid)

                Dim sql As String = "Initial Catalog=Tracking;Data Source=WXWINTER\SQLEXPRESS;Integrated Security=SSPI;"

                Dim 查询 As SqlTrackingQuery = New SqlTrackingQuery(sql)

                Dim 被查询的实例 As SqlTrackingWorkflowInstance = Nothing

                查询.TryGetWorkflow(实例Id, 被查询的实例)

     

                If 被查询的实例 IsNot Nothing Then

                    Console.WriteLine("工作流实例曾发生的状态列表:")

     

                    Dim 实例状态 As WorkflowTrackingRecord

                    For Each 实例状态 In 被查询的实例.WorkflowEvents

                        Console.WriteLine("曾发生的状态" + 实例状态.TrackingWorkflowEvent.ToString)

                        Console.WriteLine("该状态发生的时间" + 实例状态.EventDateTime.ToString)

                        Console.WriteLine("EventOrder字段值:" + 实例状态.EventOrder.ToString)

     

                        '工作流实例可能会有如下状态

                        'Aborted Changed Completed Created Exception Idle Loaded

                        'Persisted Resumed Started Suspended Terminated Unloaded

                    Next

                End If

            End Sub


     

    属性

    Annotations

     

    EventArgs

     

    EventDateTime

    记录该实例状态的时间

    EventOrder

    EventOrder字段值

    TrackingWorkflowEvent

    状态说明,TrackingWorkflowEvent类型,值如下
    Aborted Changed Completed Created Exception Idle Loaded
     Persisted Resumed Started Suspended Terminated Unloaded

  • 相关阅读:
    imp.load_source的用法
    第12周翻译
    第十周学习笔记
    翻译:高级t
    t-sql
    9周学习笔记
    第8周学习笔记
    t-sql的楼梯:超越基本级别6:使用案例表达式和IIF函数
    数据库设计层次3:构建表
    第七周学习笔记
  • 原文地址:https://www.cnblogs.com/foundation/p/513684.html
Copyright © 2011-2022 走看看