コード例 #1
0
        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));
            }
        }
コード例 #2
0
        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));
            }
        }