This commit is contained in:
parent
e88eef031c
commit
ec9586eef5
2 changed files with 2 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ public enum SessionTerminationValidationRule implements IValidationRule<ImdgVali
|
||||||
));
|
));
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
log.warn("Cannot stop session, failed to find workflowStatus 'ACTV'");
|
log.warn("Cannot stop session, failed to find workflowStatus 'ACTV'");
|
||||||
return of(ClearingError.RecordNotFound, "active session");
|
return of(ClearingError.RecordNotFound, "с активной клиринговой сессией для обнуления");
|
||||||
}
|
}
|
||||||
context.storeObject(ValidationStored.SessionTerminate, session);
|
context.storeObject(ValidationStored.SessionTerminate, session);
|
||||||
context.setValidatedObject(session);
|
context.setValidatedObject(session);
|
||||||
|
|
@ -41,7 +41,7 @@ public enum SessionTerminationValidationRule implements IValidationRule<ImdgVali
|
||||||
if (status == null || status.ordinal() >= TaskType.FormingPaymentInstruction.ordinal()) {
|
if (status == null || status.ordinal() >= TaskType.FormingPaymentInstruction.ordinal()) {
|
||||||
log.warn("Cannot stop session.id={}, unknown sessionStatus '{}'",
|
log.warn("Cannot stop session.id={}, unknown sessionStatus '{}'",
|
||||||
session.getId(), session.getSessionStatus());
|
session.getId(), session.getSessionStatus());
|
||||||
return of(ClearingError.IncorrectValue, "sessionStatus");
|
return of(ClearingError.IncorrectValue, "статуса для обнуления клиринговой сессии");
|
||||||
}
|
}
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ public class SessionTerminator {
|
||||||
IValidator validator = validation.get();
|
IValidator validator = validation.get();
|
||||||
Optional<EnumMessage> err = validator.tillFirstError();
|
Optional<EnumMessage> err = validator.tillFirstError();
|
||||||
if (err.isPresent()) {
|
if (err.isPresent()) {
|
||||||
//fixme - уточнить нужно ли
|
|
||||||
notification.sendNotification(ObjectType.session, msgs.resolve(err.get()), Priority.HIGH);
|
notification.sendNotification(ObjectType.session, msgs.resolve(err.get()), Priority.HIGH);
|
||||||
return reqInfo.error(req.getId(), err.get());
|
return reqInfo.error(req.getId(), err.get());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue