Пример #1
0
        public SchemeDefinition<XElement> GetProcessSchemeBySchemeId(Guid schemeId)
        {
            using (MySqlConnection connection = new MySqlConnection(ConnectionString))
            {
                WorkflowProcessScheme processScheme = WorkflowProcessScheme.SelectByKey(connection, schemeId);

                if (processScheme == null || string.IsNullOrEmpty(processScheme.Scheme))
                    throw new SchemeNotFoundException();

                return ConvertToSchemeDefinition(processScheme);
            }
        }
Пример #2
0
        public SchemeDefinition <XElement> GetProcessSchemeBySchemeId(Guid schemeId)
        {
            using (MySqlConnection connection = new MySqlConnection(ConnectionString))
            {
                WorkflowProcessScheme processScheme = WorkflowProcessScheme.SelectByKey(connection, schemeId);

                if (processScheme == null || string.IsNullOrEmpty(processScheme.Scheme))
                {
                    throw new SchemeNotFoundException();
                }

                return(new SchemeDefinition <XElement>(schemeId, processScheme.SchemeCode, XElement.Parse(processScheme.Scheme), processScheme.IsObsolete));
            }
        }