/// <summary>
        ///
        /// </summary>
        public void PrepareVocabs()
        {
            TraceManager.SmartTrace.TraceIn();
            vdefs = new Hashtable();

            try
            {
                RuleSetDeploymentDriver rsdd = new RuleSetDeploymentDriver(this.server, this.database);
                RuleStore store = rsdd.GetRuleStore();

                VocabularyInfoCollection vocabularyInfos = store.GetVocabularies(RuleStore.Filter.All);

                foreach (VocabularyInfo vi in vocabularyInfos)
                {
                    Vocabulary v = store.GetVocabulary(vi);

                    foreach (VocabularyDefinition o in v.Definitions)
                    {
                        if (!vdefs.ContainsKey(o.Id))
                        {
                            vdefs.Add(o.Id, o);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                TraceManager.SmartTrace.TraceError(ex);
            }

            TraceManager.SmartTrace.TraceOut();
        }
Exemplo n.º 2
0
        // for export
        private static void CopyVocabularies(RuleStore sourceRuleStore, RuleStore targetRuleStore)
        {
            VocabularyInfoCollection vocabInfoList = sourceRuleStore.GetVocabularies(RuleStore.Filter.All);

            foreach (VocabularyInfo vocabInfoItem in vocabInfoList)
            {
                Vocabulary vocabItem = sourceRuleStore.GetVocabulary(vocabInfoItem);

                string[] excludedVocabularyNames = { "Predicates", "Common Values", "Common Sets", "Functions" };
                if (!excludedVocabularyNames.Contains(vocabItem.Name))
                {
                    targetRuleStore.Add(vocabItem);
                }
            }
        }
Exemplo n.º 3
0
        // for import
        private static void CopyVocabularies(RuleStore sourceRuleStore, RuleStore targetRuleStore, Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver dd)
        {
            VocabularyInfoCollection vocabInfoList = sourceRuleStore.GetVocabularies(RuleStore.Filter.All);

            foreach (VocabularyInfo vocabInfoItem in vocabInfoList)
            {
                Vocabulary vocabItem = sourceRuleStore.GetVocabulary(vocabInfoItem);

                string[] excludedVocabularyNames = { "Predicates", "Common Values", "Common Sets", "Functions" };
                if (!excludedVocabularyNames.Contains(vocabItem.Name))
                {
                    try
                    {
                        targetRuleStore.Add(vocabItem);
                    }
                    catch (Exception e)
                    {
                        //targetRuleStore.Remove(vocabItem);
                        //targetRuleStore.Add(vocabItem);
                        //targetRuleStore.Publish(vocabItem);
                    }
                }
            }
        }
Exemplo n.º 4
0
        // for import
        private static void CopyVocabularies(RuleStore sourceRuleStore, RuleStore targetRuleStore, Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver dd)
        {
            VocabularyInfoCollection vocabInfoList = sourceRuleStore.GetVocabularies(RuleStore.Filter.All);
            foreach (VocabularyInfo vocabInfoItem in vocabInfoList)
            {
                Vocabulary vocabItem = sourceRuleStore.GetVocabulary(vocabInfoItem);

                string[] excludedVocabularyNames = { "Predicates", "Common Values", "Common Sets", "Functions" };
                if (!excludedVocabularyNames.Contains(vocabItem.Name))
                {
                    try
                    {
                        targetRuleStore.Add(vocabItem);
                    }
                    catch (Exception e)
                    {
                        //targetRuleStore.Remove(vocabItem);
                        //targetRuleStore.Add(vocabItem);
                        //targetRuleStore.Publish(vocabItem);
                    }
                }
            }
        }
Exemplo n.º 5
0
        // for export
        private static void CopyVocabularies(RuleStore sourceRuleStore, RuleStore targetRuleStore)
        {
            VocabularyInfoCollection vocabInfoList = sourceRuleStore.GetVocabularies(RuleStore.Filter.All);
            foreach (VocabularyInfo vocabInfoItem in vocabInfoList)
            {
                Vocabulary vocabItem = sourceRuleStore.GetVocabulary(vocabInfoItem);

                string[] excludedVocabularyNames = { "Predicates", "Common Values", "Common Sets", "Functions" };
                if (!excludedVocabularyNames.Contains(vocabItem.Name))
                {
                        targetRuleStore.Add(vocabItem);
                }
            }
        }