public List <string> GetRelatedByInliningSchemeCodes(string schemeCode) { using (MySqlConnection connection = new MySqlConnection(ConnectionString)) { return(WorkflowScheme.GetRelatedSchemeCodes(connection, schemeCode)); } }
public List <string> GetInlinedSchemeCodes() { using (MySqlConnection connection = new MySqlConnection(ConnectionString)) { return(WorkflowScheme.GetInlinedSchemeCodes(connection)); } }
public void SaveScheme(string schemaCode, bool canBeInlined, List <string> inlinedSchemes, string scheme) { using (MySqlConnection connection = new MySqlConnection(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); } } }
public void SetSchemeTags(string schemeCode, IEnumerable <string> tags) { using (var connection = new MySqlConnection(ConnectionString)) { WorkflowScheme.SetSchemeTags(connection, schemeCode, tags, _runtime.Builder); } }
public List <string> SearchSchemesByTags(IEnumerable <string> tags) { using (var connection = new MySqlConnection(ConnectionString)) { return(WorkflowScheme.GetSchemeCodesByTags(connection, tags)); } }
public XElement GetScheme(string code) { using(MySqlConnection connection = new MySqlConnection(ConnectionString)) { WorkflowScheme scheme = WorkflowScheme.SelectByKey(connection, code); if (scheme == null || string.IsNullOrEmpty(scheme.Scheme)) throw new SchemeNotFoundException(); return XElement.Parse(scheme.Scheme); } }
public XElement GetScheme(string code) { using (MySqlConnection connection = new MySqlConnection(ConnectionString)) { var scheme = WorkflowScheme.SelectByKey(connection, code); if (scheme == null || string.IsNullOrEmpty(scheme.Scheme)) { throw SchemeNotFoundException.Create(code, SchemeLocation.WorkflowScheme); } return(XElement.Parse(scheme.Scheme)); } }
public void SaveScheme(string schemaCode, string scheme) { using (MySqlConnection connection = new MySqlConnection(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); } } }