public SchemeDefinition <XElement> GetProcessSchemeBySchemeId(Guid schemeId) { using (OracleConnection connection = new OracleConnection(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)); } }
public SchemeDefinition <XElement> GetProcessSchemeBySchemeId(Guid schemeId) { using (SqlConnection connection = new SqlConnection(ConnectionString)) { WorkflowProcessScheme processScheme = WorkflowProcessScheme.SelectByKey(connection, schemeId); if (processScheme == null || string.IsNullOrEmpty(processScheme.Scheme)) { throw SchemeNotFoundException.Create(schemeId, SchemeLocation.WorkflowProcessScheme); } return(ConvertToSchemeDefinition(processScheme)); } }