zoukankan      html  css  js  c++  java
  • [转]获取WF容器内的所有节点

            public static void ShowActivityStruct(object activity)
            {
                
    if (activity is System.Workflow.ComponentModel.CompositeActivity)
                {
                    System.Workflow.ComponentModel.CompositeActivity wxd;
                    wxd 
    = (System.Workflow.ComponentModel.CompositeActivity)activity;
                    
    string s;
                    
    foreach (object temp in wxd.Activities)
                    {
                        ShowActivityStruct(temp);
    //递归
                    }
                    
                   
                }
                
    else
                {
                    
    if (activity is System.Workflow.ComponentModel.Activity)
                    {
                        System.Workflow.ComponentModel.Activity wxd;
                        wxd 
    = (System.Workflow.ComponentModel.Activity)activity;
                        
    string s;
                        s 
    = string.Format("说明:{0},名称:{1},类型:{2}", wxd.Description, wxd.QualifiedName, wxd.GetType().ToString());
                        Console.WriteLine(s);
                    }
                }
            }

    调用

    ShowActivityStruct(instance.GetWorkflowDefinition());


     

  • 相关阅读:
    细节问题
    慕课 python 操作数据库
    转 Python爬虫入门七之正则表达式
    转 python面试题
    转 Perl函数返回值用法指导
    慕课爬虫实战 爬取百度百科Python词条相关1000个页面数据
    慕课爬虫
    转 Python爬虫入门五之URLError异常处理
    转 廖雪峰 urllib
    转 Python爬虫入门四之Urllib库的高级用法
  • 原文地址:https://www.cnblogs.com/mmmhhhlll/p/1242004.html
Copyright © 2011-2022 走看看