public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionErrors errors = new ActionErrors(); ActionForward forward = new ActionForward(); // return value FormAgregarRolSistema formAgregarRolSistema = (FormAgregarRolSistema) form; try { SessionManager.beginTransaction(); String nombre = formAgregarRolSistema.getNombre(); PersistentArrayList acciones = formAgregarRolSistema.getAccionesPersistentesSeleccionadas(); // Agrega el usuario Cysdreq cysdreq = Cysdreq.getPersistentInstance(); HashMap params = new HashMap(2); params.put("nombreRol", nombre); params.put("tiposDeAcciones", acciones); cysdreq.ejecutarAccion(new AgregarRolSistema(), cysdreq, params); SessionManager.commit(); } catch (Throwable e) { e.printStackTrace(); SessionManager.rollback(); errors.add("rolSistema", new ActionError("errors.registrarRolSistema")); } if (!errors.isEmpty()) { saveErrors(request, errors); forward = mapping.findForward("error"); } else forward = mapping.findForward("globalSuccess"); return (forward); }