in service/src/main/java/org/apache/fineract/cn/teller/service/internal/command/handler/TellerAggregate.java [267:288]
public String process(final PauseTellerCommand pauseTellerCommand) {
final String tellerCode = pauseTellerCommand.tellerCode();
final Optional<TellerEntity> optionalTeller = this.tellerRepository.findByIdentifier(tellerCode);
if (optionalTeller.isPresent()) {
final TellerEntity tellerEntity = optionalTeller.get();
if (UserContextHolder.checkedGetUser().equals(tellerEntity.getAssignedEmployeeIdentifier())
&& tellerEntity.getState().equals(Teller.State.ACTIVE.name())) {
tellerEntity.setState(Teller.State.PAUSED.name());
tellerEntity.setLastModifiedBy(UserContextHolder.checkedGetUser());
tellerEntity.setLastModifiedOn(LocalDateTime.now(Clock.systemUTC()));
this.tellerRepository.save(tellerEntity);
return tellerCode;
} else {
this.logger.warn("Unable to pause teller {}.", tellerCode);
}
} else {
this.logger.warn("Teller {} not found.", tellerCode);
}
return null;
}