if (hashCode.hasCandidacyProcess()) {
return viewCandidacy(mapping, form, request, response, hashCode);
}
final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean();
PhdCandidacyPeriod phdCandidacyPeriod = getPhdCandidacyPeriod(hashCode);
bean.setPersonBean(new PersonBean());
bean.getPersonBean().setEmail(hashCode.getEmail());
bean.setCandidacyHashCode(hashCode);
bean.setExecutionYear(phdCandidacyPeriod.getExecutionInterval());
bean.setState(PhdProgramCandidacyProcessState.PRE_CANDIDATE);
bean.setMigratedProcess(Boolean.FALSE);
bean.setPhdCandidacyPeriod(phdCandidacyPeriod);
request.setAttribute("candidacyBean", bean);