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); } }
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)); } }