Ejemplo n.º 1
0
  @Override
  protected PhdThesisProcess executeActivity(
      PhdThesisProcess process, User userView, Object object) {

    final PhdThesisProcessBean bean = (PhdThesisProcessBean) object;

    if (bean.isToNotify()) {
      notifyJuryElements(process);
      sendAlertToJuryElement(
          process.getIndividualProgramProcess(),
          process.getPresidentJuryElement(),
          "message.phd.request.jury.reviews.external.access.jury.president.body");
    }

    if (process.getActiveState() != PhdThesisProcessStateType.WAITING_FOR_JURY_REPORTER_FEEDBACK) {
      process.createState(
          PhdThesisProcessStateType.WAITING_FOR_JURY_REPORTER_FEEDBACK, userView.getPerson(), "");
    }

    bean.setThesisProcess(process);
    if (process.getMeetingProcess() == null) {
      Process.createNewProcess(userView, PhdMeetingSchedulingProcess.class, bean);
    }

    return process;
  }
Ejemplo n.º 2
0
  @Override
  protected PhdThesisProcess executeActivity(
      PhdThesisProcess process, IUserView userView, Object object) {
    final PhdThesisProcessBean bean = (PhdThesisProcessBean) object;

    for (final PhdProgramDocumentUploadBean each : bean.getDocuments()) {
      if (each.hasAnyInformation()) {
        process.addDocument(each, userView.getPerson());
      }
    }

    checkParameters(bean);

    LocalDate conclusionDate = bean.getConclusionDate();
    process.setConclusionDate(conclusionDate);
    process.setFinalGrade(bean.getFinalGrade());

    if (!process.hasState(PhdThesisProcessStateType.CONCLUDED)) {
      process.createState(
          PhdThesisProcessStateType.CONCLUDED, userView.getPerson(), bean.getRemarks());
    }

    return process;
  }