protected override StepResults Run() { if (this.autoDecisionResponse == null) { Log.Alert("Cannot save decision for {0}: decision response is NULL.", OuterContextDescription); this.outcome = "'failed - decision response is NULL'"; return(StepResults.Failed); } // if if (this.medal == null) { Log.Alert("Cannot save decision for {0}: medal is NULL.", OuterContextDescription); this.outcome = "'failed - medal is NULL'"; return(StepResults.Failed); } // if StepResults result; if (this.autoDecisionResponse.DecidedToApprove) { WriteDecisionOutput = new WriteDecisionOutput { CreditResult = this.autoDecisionResponse.CreditResult, UserStatus = this.autoDecisionResponse.UserStatus, SystemDecision = this.autoDecisionResponse.SystemDecision, }; this.autoDecisionResponse.CreditResult = CreditResultStatus.PendingInvestor; this.autoDecisionResponse.UserStatus = Status.Manual; this.autoDecisionResponse.SystemDecision = SystemDecision.Manual; this.outcome = "pending investor"; result = StepResults.Approved; } else { this.outcome = this.autoDecisionResponse.DecidedToReject ? "rejected" : "manual"; result = StepResults.RejectedManual; } // if DateTime now = DateTime.UtcNow; AddOldDecisionOffer(now); AddNLDecisionOffer(now); CashRequestWasWritten = true; this.outcome = string.Format("'completed - {0}'", this.outcome); return(result); } // Run
public RestoreAndSaveApproved( string outerContextDescription, int underwriterID, int customerID, long cashRequestID, long nlCashRequestID, bool overrideApprovedRejected, int offerValidForHours, AutoDecisionResponse autoDecisionResponse, WriteDecisionOutput approvalToRestore ) : base( outerContextDescription, underwriterID, cashRequestID, nlCashRequestID, offerValidForHours, autoDecisionResponse ) { this.customerID = customerID; this.overrideApprovedRejected = overrideApprovedRejected; this.approvalToRestore = approvalToRestore; this.outcome = "'not executed'"; } // constructor