Beispiel #1
0
        private void LoadOrchCorrelationSets(XmlDocument doc, XmlNamespaceManager mgr)
        {
            //=====================================
            // load orchestration correlation sets
            //=====================================
            if (doc != null)
            {
                try
                {
                    XmlNodeList csNodes = doc.SelectNodes(".//om:Element[@Type='CorrelationDeclaration']", mgr);

                    foreach (XmlNode csNode in csNodes)
                    {
                        CorrelationSet cs       = new CorrelationSet();
                        XmlAttribute   scopeAtt = csNode.Attributes.GetNamedItem("ParentLink") as XmlAttribute;
                        if (scopeAtt != null &&
                            string.Compare(scopeAtt.Value, "Scope_CorrelationDeclaration", true) == 0)
                        {
                            cs.Scope = csNode.ParentNode.SelectSingleNode("om:Property[@Name='Name']", mgr).Attributes.GetNamedItem("Value").Value;
                        }

                        cs.Name     = csNode.SelectSingleNode("om:Property[@Name='Name']", mgr).Attributes.GetNamedItem("Value").Value;
                        cs.TypeName = csNode.SelectSingleNode("om:Property[@Name='Type']", mgr).Attributes.GetNamedItem("Value").Value;

                        XmlNode descNode = csNode.SelectSingleNode("om:Property[@Name='AnalystComments']", mgr);
                        if (descNode != null)
                        {
                            cs.Description = descNode.Attributes.GetNamedItem("Value").Value;
                        }

                        BizTalkBaseObject definingType = this.correlationSetTypes[cs.TypeName];
                        if (definingType != null)
                        {
                            cs.DefiningTypeId = definingType.Id;
                        }

                        this.correlationSets.Add(cs, true);
                    }
                }
                catch (Exception ex)
                {
                    TraceManager.SmartTrace.TraceError(ex);
                }
            }
        }
Beispiel #2
0
        private void LoadOrchCorrelationTypes(XmlDocument doc, XmlNamespaceManager mgr)
        {
            //=========================================
            // load orchestration correlation set types
            //=========================================
            if (doc != null)
            {
                try
                {
                    XmlNodeList csNodes = doc.SelectNodes(".//om:Element[@Type='CorrelationType']", mgr);

                    foreach (XmlNode csNode in csNodes)
                    {
                        string typeName = csNode.SelectSingleNode("om:Property[@Name='Name']", mgr).Attributes.GetNamedItem("Value").Value;
                        string orchName = csNode.ParentNode.SelectSingleNode("om:Property[@Name='Name']", mgr).Attributes.GetNamedItem("Value").Value;

                        CorrelationSet cs = new CorrelationSet();
                        cs.Name = orchName + "." + typeName;

                        XmlNodeList csPropertyNodes = csNode.SelectNodes("om:Element[@Type='PropertyRef']", mgr);

                        foreach (XmlNode csPropertyNode in csPropertyNodes)
                        {
                            string propertyRef = csPropertyNode.SelectSingleNode("om:Property[@Name='Ref']", mgr).Attributes.GetNamedItem("Value").Value;
                            cs.CorrelatedProperties.Add(propertyRef);
                        }

                        this.correlationSetTypes.Add(cs, true);
                    }
                }
                catch (Exception ex)
                {
                    TraceManager.SmartTrace.TraceError(ex);
                }
            }
        }