Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get rule name from BiZtalk Business Rules? I have defined policies and version under each version that I have rules added.

I can iterate through Policies and get there details as follows:
C#
Microsoft.RuleEngine.RuleSetDeploymentDriver rdd = new Microsoft.RuleEngine.RuleSetDeploymentDriver("BG4WS0325", "BizTalkRuleEngineDb");
            SqlRuleStore sqlRuleStore = (SqlRuleStore)rdd.GetRuleStore();
            Microsoft.RuleEngine.RuleSetInfoCollection colPolInfo = null; 
            colPolInfo = sqlRuleStore.GetRuleSets(RuleStore.Filter.All); 
            foreach (RuleSetInfo pInfo in colPolInfo)
            {
                MessageBox.Show(string.Format("Policy- Info = [{0}].v.{1}.{2}",
                    pInfo.Name, pInfo.MajorRevision, pInfo.MinorRevision));
                //get the policies to extract rules
                Microsoft.RuleEngine.RuleSet pol = sqlRuleStore.GetRuleSet(pInfo);
                
                //MessageBox.Show(string.Format("Rules- Count = [{0}]", pol.Rules.Count));
                //pol.Rules.Values
                
                MessageBox.Show(string.Format("Rules- Count = [{0}]", pol.Rules.Count));
            }
        }

I want to get the rules name too. How to get the rules name under each policy?

Regards,
Prabhu.s
Posted
Updated 13-Sep-10 6:42am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900