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

  • 相关阅读:
    .net事件和委托
    DataFormatString使用笔记
    DropDownList 绑定 枚举 Enum
    iOS开发如何实现消息推送机制
    JQuery调用asp.net后台方法
    Android 服务器推送技术
    Jquery Ajax ashx DataTable 传参 获取参数 C#
    jquery 基础
    [Perl书籍合集]Perl eBooks Collection
    LISP之根源
  • 原文地址:https://www.cnblogs.com/foundation/p/513684.html
Copyright © 2011-2022 走看看