Ejemplo n.º 1
0
  @Override
  protected PhdProgramCandidacyProcess executeActivity(
      PhdProgramCandidacyProcess process, User userView, Object object) {
    final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
    process.createState(
        PhdProgramCandidacyProcessState.REJECTED, userView.getPerson(), bean.getRemarks());

    AlertService.alertAcademicOffice(
        process.getIndividualProgramProcess(),
        AcademicOperationType.VIEW_PHD_CANDIDACY_ALERTS,
        "message.phd.alert.candidacy.reject.subject",
        "message.phd.alert.candidacy.reject.body");

    return process;
  }
Ejemplo n.º 2
0
  @Override
  protected PhdProgramCandidacyProcess executeActivity(
      PhdProgramCandidacyProcess process, User userView, Object object) {

    final PhdIndividualProgramProcess mainProcess = process.getIndividualProgramProcess();
    if (mainProcess.getPhdProgram() == null) {
      throw new DomainException(
          "error.phd.candidacy.PhdProgramCandidacyProcess.RequestCandidacyReview.invalid.phd.program");
    }

    final PhdProgramCandidacyProcessStateBean bean = (PhdProgramCandidacyProcessStateBean) object;
    process.createState(
        PhdProgramCandidacyProcessState.PENDING_FOR_COORDINATOR_OPINION,
        userView.getPerson(),
        bean.getRemarks());

    if (bean.getGenerateAlert()) {
      AlertService.alertCoordinators(mainProcess, subject(), body(mainProcess));
    }

    return process;
  }