public String process()

in service/src/main/java/org/apache/fineract/cn/teller/service/internal/command/handler/TellerTransactionAggregate.java [145:159]


  public String process(final CancelTellerTransactionCommand cancelTellerTransactionCommand) {
    final Optional<TellerTransactionEntity> optionalTellerTransaction =
        this.tellerTransactionRepository.findByIdentifier(cancelTellerTransactionCommand.tellerTransactionIdentifier());

    if (optionalTellerTransaction.isPresent()) {
      final TellerTransactionEntity tellerTransactionEntity = optionalTellerTransaction.get();
      tellerTransactionEntity.setState(TellerTransaction.State.CANCELED.name());
      this.tellerTransactionRepository.save(tellerTransactionEntity);

      return cancelTellerTransactionCommand.tellerTransactionIdentifier();
    } else {
      this.logger.warn("Teller transaction {} not found", cancelTellerTransactionCommand.tellerTransactionIdentifier());
    }
    return null;
  }