public override void RunWithoutDocumentContext(RunCustomActionWithoutContextParams args) { var log = new StringBuilder(); try { Stopwatch sw = new Stopwatch(); sw.Start(); var response = new SkribbleHelper(log, Configuration.ApiConfig).ChecAllkDocumentStatus(); log.AppendLine($"API returned {response.Count()} envelopes"); var sqlQuery = $"SELECT WFD_ID, {Configuration.Workflow.OperationFieldName} " + $"from WFElements where WFD_STPID = {Configuration.Workflow.StepId}"; var dt = SqlExecutionHelper.GetDataTableForSqlCommandOutsideTransaction(sqlQuery); CheckSignStatus(dt, response, sw); } catch (Exception e) { log.AppendLine(e.ToString()); args.HasErrors = true; args.Message = e.Message; } finally { args.LogMessage = log.ToString(); args.Context.PluginLogger.AppendInfo(log.ToString()); } }
private void CheckAndMoveElements(List <Useragreementlist> agreements) { Stopwatch sw = new Stopwatch(); sw.Start(); var sqlQuery = $"SELECT WFD_ID, {Configuration.Workflow.OperationFieldName} " + $"FROM WFElements WHERE WFD_STPID = {Configuration.Workflow.StepId}"; var dt = SqlExecutionHelper.GetDataTableForSqlCommandOutsideTransaction(sqlQuery); CheckDocumentsStatus(dt, agreements, sw); }