zoukankan      html  css  js  c++  java
  • Tracking_查询用户自定义状态

     

    用户自定义状态对象:UserTrackingRecord

    用户自定义状态对象:UserTrackingRecord以集合成员的方式存于SqlTrackingWorkflowInstanceUserEvents集合中

    用户自定义状态如何添加见[Tracking_在Activty中向Tracking添加用户自定义状态(4)]

    (代码)
    无须在
    WorkflowRuntime宿主程序中

            private static void 得到用户状态(System.Guid 实例Id)
            
    {
    string sql = @"Initial Catalog=Tracking;Data Source=WXWINTER\SQLEXPRESS;Integrated Security=SSPI;";
                SqlTrackingQuery 查询 
    = new SqlTrackingQuery(sql);
                SqlTrackingWorkflowInstance 被查询的实例;
                查询.TryGetWorkflow(实例Id, 
    out 被查询的实例);

                
    foreach (UserTrackingRecord 用户状态 in 被查询的实例.UserEvents)
                
    {
                    Console.WriteLine(
    "====================================");
                    Console.WriteLine(
    "所属Activity:" +用户状态.QualifiedName);
                    Console.WriteLine(
    "Activity类型:" + 用户状态.ActivityType.ToString() );
                    Console.WriteLine(
    "上下文ID:" + 用户状态.ContextGuid.ToString());
                    Console.WriteLine(
    "时间: " + 用户状态.EventDateTime.ToString());
                    Console.WriteLine(
    "内容:" + 用户状态.UserData.ToString());
                    Console.WriteLine(
    "EventOrder字段值:" + 用户状态.EventOrder.ToString());
                    Console.WriteLine(
    "Parent上下文ID:" + 用户状态.ParentContextGuid.ToString());
                    
    try { Console.WriteLine("键值对:"+用户状态.UserDataKey.ToString());}
                    
    catch { Console.WriteLine("该条无键值对!"); }
                    
                    Console.WriteLine();
                }

            }


    运行结果

  • 相关阅读:
    Intent
    What should we do next in general after collecting relevant data
    NOTE FOR Secure Friend Discovery in Mobile Social Networks
    missing pcap.h
    after building Android Source code
    plot point(one column)
    When talking to someone else, don't infer that is has been talked with others at first. It may bring repulsion to the person who is talking with you.
    进程基本知识
    Python input和raw_input的区别
    强制 code review:reviewboard+svn 的方案
  • 原文地址:https://www.cnblogs.com/foundation/p/514494.html
Copyright © 2011-2022 走看看