class GrantOfferLetterServiceImpl extends BaseTransactionalService implements GrantOfferLetterService {

    private ServiceResult<Void> sendGrantOfferLetterSuccess(Project project) {

        return getCurrentlyLoggedInUser().andOnSuccess(user -> {

            if (golWorkflowHandler.grantOfferLetterSent(project, user)) {
                return serviceSuccess();
            } else {
                LOG.error(String.format(GOL_STATE_ERROR, project.getId()));
                return serviceFailure(CommonFailureKeys.GENERAL_UNEXPECTED_ERROR);
            }
        });
    }

}