コード例 #1
0
 public List <string> GetRelatedByInliningSchemeCodes(string schemeCode)
 {
     using (OracleConnection connection = new OracleConnection(ConnectionString))
     {
         return(WorkflowScheme.GetRelatedSchemeCodes(connection, schemeCode));
     }
 }
コード例 #2
0
 public List <string> GetInlinedSchemeCodes()
 {
     using (OracleConnection connection = new OracleConnection(ConnectionString))
     {
         return(WorkflowScheme.GetInlinedSchemeCodes(connection));
     }
 }
コード例 #3
0
        public void SaveScheme(string schemaCode, bool canBeInlined, List <string> inlinedSchemes, string scheme)
        {
            using (OracleConnection connection = new OracleConnection(ConnectionString))
            {
                WorkflowScheme wfScheme = WorkflowScheme.SelectByKey(connection, schemaCode);
                if (wfScheme == null)
                {
                    wfScheme = new WorkflowScheme
                    {
                        Code           = schemaCode,
                        Scheme         = scheme,
                        CanBeInlined   = canBeInlined,
                        InlinedSchemes = inlinedSchemes.Any() ? JsonConvert.SerializeObject(inlinedSchemes) : null
                    };
                    wfScheme.Insert(connection);
                }
                else
                {
                    wfScheme.Scheme         = scheme;
                    wfScheme.CanBeInlined   = canBeInlined;
                    wfScheme.InlinedSchemes = inlinedSchemes.Any() ? JsonConvert.SerializeObject(inlinedSchemes) : null;
                    wfScheme.Update(connection);
                }

                WorkflowScheme.Commit(connection);
            }
        }
コード例 #4
0
 public void SetSchemeTags(string schemeCode, IEnumerable <string> tags)
 {
     using (var connection = new OracleConnection(ConnectionString))
     {
         WorkflowScheme.SetSchemeTags(connection, schemeCode, tags, _runtime.Builder);
     }
 }
コード例 #5
0
 public List <string> SearchSchemesByTags(IEnumerable <string> tags)
 {
     using (var connection = new OracleConnection(ConnectionString))
     {
         return(WorkflowScheme.GetSchemeCodesByTags(connection, tags));
     }
 }
コード例 #6
0
        public XElement GetScheme(string code)
        {
            using (OracleConnection connection = new OracleConnection(ConnectionString))
            {
                WorkflowScheme scheme = WorkflowScheme.SelectByKey(connection, code);
                if (scheme == null || string.IsNullOrEmpty(scheme.Scheme))
                {
                    throw new SchemeNotFoundException();
                }

                return(XElement.Parse(scheme.Scheme));
            }
        }
コード例 #7
0
        public void SaveScheme(string schemaCode, string scheme)
        {
            using (OracleConnection connection = new OracleConnection(ConnectionString))
            {
                WorkflowScheme wfScheme = WorkflowScheme.SelectByKey(connection, schemaCode);
                if (wfScheme == null)
                {
                    wfScheme        = new WorkflowScheme();
                    wfScheme.Code   = schemaCode;
                    wfScheme.Scheme = scheme;
                    wfScheme.Insert(connection);
                }
                else
                {
                    wfScheme.Scheme = scheme;
                    wfScheme.Update(connection);
                }

                WorkflowScheme.Commit(connection);
            }
        }