@Override
public ActionForward createCandidacy(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
final PhdProgramCandidacyProcessBean bean = getCandidacyBean();
try {
CreateNewProcess.run(PublicPhdIndividualProgramProcess.class, bean);
sendApplicationSuccessfullySubmitedEmail(bean.getCandidacyHashCode(), request);
} catch (final DomainException e) {
if ("error.person.existent.docIdAndType".equals(e.getKey())) {
addErrorMessage(request, "error.phd.public.candidacy.fill.personal.information.and.institution.id", e.getArgs());
} else {
addErrorMessage(request, e.getKey(), e.getArgs());
}
bean.clearPerson();
// clearDocumentsInformation(bean);
return createCandidacyStepOneInvalid(mapping, form, request, response);
}
final String url = EPFLPhdCandidacyProcessProperties.getPublicCandidacyAccessLink(bean.getCandidacyHashCode());
return new FenixActionForward(request, new ActionForward(url, true));
}