public ActionForward createParticipator(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws FenixServiceException {

    ResearchResult result = getResultFromRequest(request);
    ResultParticipationCreationBean bean =
        (ResultParticipationCreationBean)
            RenderUtils.getViewState("beanForExternalPerson").getMetaObject().getObject();

    if (bean.getOrganization() != null) {

      ExternalContract contract =
          InsertExternalPerson.run(
              new InsertExternalPerson.ServiceArguments(
                  bean.getParticipatorName(), bean.getOrganization()));
      bean.setParticipator(contract.getPerson().getPersonName());
      createParticipation(bean);
    } else {
      request.setAttribute("createUnit", true);
      request.setAttribute("duringCreation", true);
      request.setAttribute("bean", bean);
      setResParticipationRequestAttributes(request, result, bean);
      RenderUtils.invalidateViewState();
      return mapping.findForward("editParticipation");
    }
    return prepareEdit(mapping, form, request, response);
  }
 public void setExternalPerson(ExternalContract externalPerson) {
   if (externalPerson == null) {
     this.person = null;
   } else {
     setPerson(externalPerson.getPerson());
   }
 }