/// <summary>
        /// 保存Xml到数据库
        /// </summary>
        /// <param name="processDesp"></param>
        /// <param name="xml"></param>
        protected override void SaveXml(IWfProcessDescriptor processDesp, XElement xml)
        {
            WfProcessDescriptorInfo info = WfProcessDescriptorInfo.FromProcessDescriptor(processDesp, xml);

            using (TransactionScope scope = TransactionScopeFactory.Create())
            {
                WfProcessDescriptorInfoAdapter.Instance.Update(info);

                WfProcessDescriptorDimensionAdapter.Instance.Update(WfProcessDescriptorDimension.FromProcessDescriptor(processDesp));

                scope.Complete();
            }
        }
Ejemplo n.º 2
0
        public static WfProcessDescriptorDimension FromProcessDescriptor(IWfProcessDescriptor processDesp)
        {
            processDesp.NullCheck("processDesp");

            WfProcessDescriptorDimension result = new WfProcessDescriptorDimension();

            result.ProcessKey = processDesp.Key;

            XElement xml = XElement.Parse("<Process/>");

            ((ISimpleXmlSerializer)processDesp).ToXElement(xml, string.Empty);

            result.Data = xml.ToString();

            return(result);
        }