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()); } }
public override void RunWithoutDocumentContext(RunCustomActionWithoutContextParams args) { var log = new StringBuilder(); try { var api = new AdobeSignHelper(log); var agreements = api.GetAllStatus(Configuration.TokenValue); CheckAndMoveElements(agreements.userAgreementList?.ToList()); } catch (Exception e) { args.HasErrors = true; args.Message = e.Message; log.AppendLine(e.ToString()); } finally { args.LogMessage = log.ToString(); args.Context.PluginLogger.AppendInfo(log.ToString()); } }
public override void RunWithoutDocumentContext(RunCustomActionWithoutContextParams args) { try { var timer = new Stopwatch(); timer.Start(); var envelopesToCheck = GetEnvelopesInfo(args.Context); var apiClient = new ApiClient(); var allEnvelopes = new ApiHelper(apiClient, Configuration.ApiSettings, _logger).ListChanges(Configuration.EnvelopeLifetimeInDays); DoActionsForEnvelopes(allEnvelopes, envelopesToCheck, timer); } catch (Exception ex) { _logger.AppendLine(ex.ToString()); args.Message = ex.Message; args.HasErrors = true; } finally { args.LogMessage = _logger.ToString(); args.Context.PluginLogger.AppendInfo(_logger.ToString()); } }