Java Code Examples for org.apache.struts.action.ActionMessages#add()

The following examples show how to use org.apache.struts.action.ActionMessages#add() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AllowSlaveOrgsAction.java    From spacewalk with GNU General Public License v2.0 6 votes vote down vote up
private ActionForward handleDispatchAction(ActionMapping mapping,
        RequestContext context,
        Long sid,
        Set sessionSet) {
    Set<Org> allowedOrgs = new HashSet<Org>();
    IssSlave s = IssFactory.lookupSlaveById(sid);
    for (String soid : (Set<String>) sessionSet) {
        Long oid = Long.parseLong(soid);
        Org anOrg = OrgFactory.lookupById(oid);
        allowedOrgs.add(anOrg);
    }
    s.setAllowedOrgs(allowedOrgs);

    ActionMessages msg = new ActionMessages();
    msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
            "message.iss_slave_allowed_orgs_updated", s.getSlave()));
    getStrutsDelegate().saveMessages(context.getRequest(), msg);

    Map params = makeParamMap(context.getRequest());
    if (sid != null) {
        params.put("sid", sid);
    }
    return StrutsDelegate.getInstance().forwardParams(
            mapping.findForward("success"), params);
}
 
Example 2
Source File: DocumentOperationAction.java    From rice with Educational Community License v2.0 6 votes vote down vote up
public ActionForward queueActionInvocation(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
	try {
		DocumentOperationForm docForm = (DocumentOperationForm) form;
		String principalId = KEWServiceLocator.getIdentityHelperService().getIdForPrincipalName(docForm.getActionInvocationUser());
		ActionInvocation invocation = ActionInvocation.create(ActionType.fromCode(
                   docForm.getActionInvocationActionCode()), docForm.getActionInvocationActionItemId());
           DocumentRouteHeaderValue document = docForm.getRouteHeader();
           String applicationId = document.getDocumentType().getApplicationId();
		ActionInvocationQueue actionInvocationQueue = KewApiServiceLocator.getActionInvocationProcessorService(
		    document.getDocumentId(), applicationId);
		actionInvocationQueue.invokeAction(principalId, docForm.getRouteHeader().getDocumentId(), invocation);
		ActionMessages messages = new ActionMessages();
		messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Action Invocation Processor was successfully scheduled"));
		saveMessages(request, messages);
		return mapping.findForward("basic");
	} catch (Exception e) {
		throw new WorkflowRuntimeException(e);
	}
}
 
Example 3
Source File: PreferencesAction.java    From unitime with Apache License 2.0 6 votes vote down vote up
protected void addDistPref(
        HttpServletRequest request, 
        PreferencesForm frm,
        ActionMessages errors ) {
 
    List lst = frm.getDistPrefs();
    if(frm.checkPrefs(lst)) {
        for (int i=0; i<Constants.PREF_ROWS_ADDED; i++) {
         frm.addToDistPrefs(
                 Preference.BLANK_PREF_VALUE, 
                 Preference.BLANK_PREF_VALUE );
        }
        request.setAttribute(HASH_ATTR, HASH_DIST_PREF);
    }
    else {
        errors.add("distPrefs", 
                   new ActionMessage(
                           "errors.generic", 
                           MSG.errorInvalidDistributionPreference()) );
        saveErrors(request, errors);
    }
}
 
Example 4
Source File: RecipientAction.java    From openemm with GNU Affero General Public License v3.0 6 votes vote down vote up
protected ActionForward prepareListOverview(RecipientForm aForm, ActionForward destination, ActionMapping mapping, HttpServletRequest request, ActionMessages errors, ActionMessages messages) {
	if (destination != null && ("list".equals(destination.getName()))) {
		try {
			destination = processListOverviewLoading(aForm, mapping, request, errors, messages);
			aForm.setDatePickerFormat(AgnUtils.getAdmin(request).getDateFormat().toPattern());
		} catch (Exception e) {
			logger.error("recipientList: " + e, e);
			errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.exception", configService.getValue(ConfigValue.SupportEmergencyUrl)));
			aForm.setError(true); // do not refresh when an error has been occurred
		}

		if (aForm.isDeactivatePagination()) {
			int maxRecipients = AgnUtils.getCompanyMaxRecipients(request);
			request.setAttribute("countOfRecipients", maxRecipients);
		}
	}
	return destination;
}
 
Example 5
Source File: ComMailingBaseAction.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
private void validateFollowUpBaseMailing(ComMailingBaseForm form, HttpServletRequest req, ActionMessages errors, ActionMessages messages) {
    String followUpFor = mailingDao.getFollowUpFor(form.getMailingID());
    if (StringUtils.isNotEmpty(followUpFor)) {
        int baseMailingId = Integer.parseInt(followUpFor);

        if (mailingDao.getLastSendDate(baseMailingId) == null) {
            messages.add(GuiConstants.ACTIONMESSAGE_CONTAINER_WARNING, new ActionMessage("warning.mailing.followup.basemail_was_not_sent"));
        } else if (!isBaseMailingTrackingDataAvailable(baseMailingId, AgnUtils.getAdmin(req))) {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.mailing.followup.basemail_data_not_exists"));
        }
    }
}
 
Example 6
Source File: UnsubscribeConfirmSubmitAction.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
private void createMessage(HttpServletRequest request, int successes) {
    ActionMessages msg = new ActionMessages();
    if (successes == 1) {
        msg.add(ActionMessages.GLOBAL_MESSAGE,
                new ActionMessage("unsubscribe.ssm.success"));
    }
    else {
        msg.add(ActionMessages.GLOBAL_MESSAGE,
            new ActionMessage("unsubscribe.ssm.successes", new Integer(successes)));
    }
    getStrutsDelegate().saveMessages(request, msg);
}
 
Example 7
Source File: RhnAction.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Add a success message to the request with any parameters.
 *
 * @param req to add the message to
 * @param msgKey resource key to lookup
 * @param params String values to fill in
 */
protected void createMessage(HttpServletRequest req, String msgKey,
        String[] params) {

    ActionMessages msg = new ActionMessages();
    for (int i = 0; i < params.length; i++) {
        params[i] = StringEscapeUtils.escapeHtml(params[i]);
    }
    msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(msgKey, params));
    saveMessages(req, msg);
}
 
Example 8
Source File: AssignedGroupsSetupAction.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Updates the System Groups permissions for the specified user.
 * @param mapping Struts ActionMapping
 * @param formIn Form containing submitted data.
 * @param request HttpServletRequest
 * @param response HttpServletResponse
 */
public void updatePerm(ActionMapping mapping,
                                ActionForm formIn,
                                HttpServletRequest request,
                                HttpServletResponse response) {

    RequestContext requestContext = new RequestContext(request);
    User user = UserManager.lookupUser(requestContext.getCurrentUser(),
            requestContext.getParamAsLong("uid"));
    if (user == null) {
        throw new BadParameterException("Invalid uid");
    }
    //request.setAttribute(RhnHelper.TARGET_USER, user);

    RhnSet set =  getSetDecl().get(requestContext.getCurrentUser());

    List<Long> serverGroupIds =
            set.getElements().stream().map(RhnSetElement::getElement).collect(toList());

    UserManager.updateServerGroupPermsForUser(user, serverGroupIds);

    ActionMessages msgs = new ActionMessages();
    msgs.add(ActionMessages.GLOBAL_MESSAGE,
         new ActionMessage("message.perms_updated",
         StringEscapeUtils.escapeHtml4(user.getLogin())));
    saveMessages(request, msgs);
}
 
Example 9
Source File: MessageList.java    From rice with Educational Community License v2.0 5 votes vote down vote up
public ActionMessages toActionMessages() {
	ActionMessages actionMessages = new ActionMessages();
	for (ErrorMessage errorMessage : this) {
		actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(errorMessage.getErrorKey(), errorMessage.getMessageParameters()));
	}
	return actionMessages;
}
 
Example 10
Source File: SessionRollForward.java    From unitime with Apache License 2.0 5 votes vote down vote up
public void rollMidtermExamsForward(ActionMessages errors, RollForwardSessionForm rollForwardSessionForm){
	Session toSession = Session.getSessionById(rollForwardSessionForm.getSessionToRollForwardTo());
	
	try {
		List exams = findExamToRollForward(toSession, ExamType.sExamTypeMidterm);
		for(Iterator examIt = exams.iterator(); examIt.hasNext();){
			rollForwardExam((Exam) examIt.next(), toSession, rollForwardSessionForm.getMidtermExamsPrefsAction());
		}
	} catch (Exception e) {
		iLog.error("Failed to roll all midterm exams forward.", e);
		errors.add("rollForward", new ActionMessage("errors.rollForward", "Midterm Exam", "previous session", toSession.getLabel(), "Failed to roll all midterm exams forward."));
	}		
}
 
Example 11
Source File: ChannelOverviewTasks.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
private void makeMessage(int successes, HttpServletRequest request) {
    if (successes > 0) {
        String number = LocalizationService.getInstance()
                .formatNumber(successes);

        //create the success message
        ActionMessages msg = new ActionMessages();
        String key;
        if (successes == 1) {
            key = "configdiff.schedule.success.singular";
        }
        else {
            key = "configdiff.schedule.success";
        }

        Object[] args = new Object[1];
        args[0] = StringEscapeUtils.escapeHtml4(number);

        //add in the success message
        msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(key, args));
        getStrutsDelegate().saveMessages(request, msg);
    }
    else {
        //Something went wrong, tell user!
        ActionErrors errors = new ActionErrors();
        getStrutsDelegate().addError("configdiff.schedule.error", errors);
        getStrutsDelegate().saveMessages(request, errors);
    }
}
 
Example 12
Source File: CreateCustomKeyAction.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
private void bindMessage(RequestContext requestContext, String error) {
    ActionMessages msg = new ActionMessages();
    String[] actionParams = {};
    msg.add(ActionMessages.GLOBAL_MESSAGE,
            new ActionMessage(error, actionParams));
    getStrutsDelegate().saveMessages(requestContext.getRequest(), msg);
}
 
Example 13
Source File: FenixAction.java    From fenixedu-academic with GNU Lesser General Public License v3.0 4 votes vote down vote up
protected void addErrorMessage(HttpServletRequest request, String property, String key, String... args) {
    final ActionMessages messages = getErrors(request);
    messages.add(property, new ActionMessage(key, args));
    saveErrors(request, messages);
}
 
Example 14
Source File: ComImportWizardAction.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
private void checkProfileKeyColumnIndexed(ComImportWizardForm aForm, HttpServletRequest req, ActionMessages messages) {
  	String keyColumn = aForm.getImportWizardHelper().getKeyColumn().toLowerCase();
if (!DbUtilities.checkForIndex(dataSource, "customer_" + AgnUtils.getCompanyID(req) + "_tbl", Arrays.asList(new String[]{keyColumn}))) {
	messages.add(GuiConstants.ACTIONMESSAGE_CONTAINER_WARNING, new ActionMessage("warning.import.keyColumn.index"));
}
  }
 
Example 15
Source File: XccdfDeleteConfirmAction.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public ActionForward execute(ActionMapping mapping, ActionForm formIn,
        HttpServletRequest request,
        HttpServletResponse response) {
    RequestContext context = new RequestContext(request);
    Long sid = context.getRequiredParam(RequestContext.SID);
    Server server = context.lookupAndBindServer();
    User user = context.getCurrentUser();

    RhnSet set = getSetDecl(sid).get(user);
    if (request.getParameter("xid") != null) {
        Long xid = Long.parseLong(request.getParameter("xid"));
        if (xid != null && xid > 0) {
            // Being redirected from XccdfDetails.do, asked to delete a single scan
            set.clear();
            set.addElement(xid);
            RhnSetFactory.save(set);
        }
    }

    DataResult<XccdfTestResultDto> result = ScapManager.scansInSet(user,
            set.getLabel());

    TagHelper.bindElaboratorTo(LIST_NAME, result.getElaborator(), request);

    request.setAttribute(RequestContext.SID, sid);
    request.setAttribute(ListTagHelper.PARENT_URL,
        request.getRequestURI() + "?" + RequestContext.SID + "=" + sid);
    request.setAttribute(RequestContext.PAGE_LIST, result);

    if (context.wasDispatched(CONFIRM_BUT)) {
       Long removedCount = null;
       try {
           removedCount = ScapManager.deleteScansInSet(result);
       }
       finally {
           RhnSetFactory.cleanup(set);
       }
       Long retainedCount = result.size() - removedCount;
       ActionMessages msg = (removedCount == 0) ?
           new ActionErrors() : new ActionMessages();
       String[] messageParams = {removedCount.toString(), retainedCount.toString()};
       msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
           "system.audit.xccdfdeleteconfirm.jsp.message", messageParams));
       getStrutsDelegate().saveMessages(request, msg);
       Map<String, Long> params = new HashMap<String, Long>();
       params.put(RequestContext.SID, sid);
       return getStrutsDelegate().forwardParams(mapping.findForward("submit"),
               params);
    }

    return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
 
Example 16
Source File: ActivationKeyPackagesAction.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
                             ActionForm formIn,
                             HttpServletRequest request,
                             HttpServletResponse response) {

    DynaActionForm form = (DynaActionForm)formIn;
    Map params = makeParamMap(request);
    RequestContext ctx = new RequestContext(request);

    // keep the token id
    if (ctx.getParam(RequestContext.TOKEN_ID, true) != null) {
        params.put(RequestContext.TOKEN_ID, ctx.getParam(
                RequestContext.TOKEN_ID, true));
    }

    ActivationKey key = ctx.lookupAndBindActivationKey();
    ActivationKeyPackagesCommand cmd = new ActivationKeyPackagesCommand(key);

    request.setAttribute(DESCRIPTION, key.getNote());

    if (!isSubmitted(form)) {
        // setup form
        setupForm(form, cmd);
        return getStrutsDelegate().forwardParams(
                mapping.findForward(RhnHelper.DEFAULT_FORWARD),
                request.getParameterMap());
    }


    ValidatorError ve = edit(form, cmd);
    if (ve != null) {
        ValidatorError[] verr = {ve};
        getStrutsDelegate().saveMessages(request,
                RhnValidationHelper.validatorErrorToActionErrors(verr));
    }
    else {
        cmd.store();

        ActionMessages messages = new ActionMessages();
        ActionMessage message =  new ActionMessage("activation-key.java.modified",
                key.getNote());
        messages.add(ActionMessages.GLOBAL_MESSAGE, message);
        getStrutsDelegate().saveMessages(ctx.getRequest(), messages);
    }

    return getStrutsDelegate().forwardParams(mapping.findForward("success"), params);
}
 
Example 17
Source File: EditSlaveAction.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
private Long updateSlaveDetails(ActionMapping mapping, DynaActionForm dynaForm,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {

    Long sid = null;
    sid = (Long) dynaForm.get(IssSlave.ID);
    boolean isNew = (IssSlave.NEW_SLAVE_ID == sid);

    IssSlave slave = null;
    if (isNew) {
        slave = new IssSlave();
    }
    else {
        slave = IssFactory.lookupSlaveById(sid);
    }

    String fqdn = dynaForm.getString(IssSlave.SLAVE);
    slave.setSlave(fqdn);
    Boolean enabled = (Boolean) dynaForm.get(IssSlave.ENABLED);
    if (enabled == null) {
        enabled = Boolean.FALSE;
    }
    slave.setEnabled(enabled ? "Y" : "N");
    Boolean allowAll = (Boolean) dynaForm.get(IssSlave.ALLOWED_ALL_ORGS);
    if (allowAll == null) {
        allowAll = Boolean.FALSE;
    }
    slave.setAllowAllOrgs(allowAll ? "Y" : "N");

    if (isNew) {
        IssFactory.save(slave);
        slave = (IssSlave) IssFactory.reload(slave);
        sid = slave.getId();
    }

    ActionMessages msg = new ActionMessages();
    if (isNew) {
        msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "message.iss_slave_created", fqdn));
    }
    else {
        msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "message.iss_slave_updated", fqdn));
    }
    getStrutsDelegate().saveMessages(request, msg);
    return sid;
}
 
Example 18
Source File: OrgConfigAction.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
protected ActionForward process(ActionMapping mapping, HttpServletRequest request,
        RequestContext ctx, Org org) {
    if (ctx.isSubmitted()) {
        org.getOrgConfig().setStagingContentEnabled(request.
                getParameter("staging_content_enabled") != null);
        org.getOrgConfig().setErrataEmailsEnabled(request.
                getParameter("errata_emails_enabled") != null);


        if (request.getParameter("crash_reporting_enabled") == null) {
            org.getOrgConfig().setCrashReportingEnabled(false);
            org.getOrgConfig().setCrashfileUploadEnabled(false);
        }
        else {
            org.getOrgConfig().setCrashReportingEnabled(true);
            org.getOrgConfig().setCrashfileUploadEnabled(request.
                getParameter("crashfile_upload_enabled") != null);
        }

        org.getOrgConfig().setScapfileUploadEnabled(request.
                getParameter("scapfile_upload_enabled") != null);

        Long newCrashLimit = null;
        Long newScapLimit = null;
        Long newScapRetentionPeriod = null;
        try {
            newCrashLimit = Long.parseLong(
                       request.getParameter("crashfile_sizelimit"));

            newScapLimit = Long.parseLong(
                       request.getParameter("scapfile_sizelimit"));
            newScapRetentionPeriod = Long.parseLong(
                       request.getParameter(SCAP_RETENTION_PERIOD));

            if (newCrashLimit < 0 || newScapLimit < 0 || newScapRetentionPeriod < 0) {
                throw new IllegalArgumentException();
            }
        }
        catch (IllegalArgumentException ex) {
            ValidatorError error = new ValidatorError("orgsizelimit.invalid");
            getStrutsDelegate().saveMessages(request,
                RhnValidationHelper.validatorErrorToActionErrors(error));

            return getStrutsDelegate().forwardParam(mapping.findForward("error"),
                       RequestContext.ORG_ID, org.getId().toString());
        }
        if (StringUtils.isNotEmpty(request.getParameter("crashfile_sizelimit"))) {
            org.getOrgConfig().setCrashFileSizelimit(newCrashLimit);
        }
        if (StringUtils.isNotEmpty(request.getParameter("scapfile_sizelimit"))) {
            org.getOrgConfig().setScapFileSizelimit(newScapLimit);
        }
        if (StringUtils.isNotEmpty(request.getParameter(SCAP_RETENTION_PERIOD))) {
            org.getOrgConfig().setScapRetentionPeriodDays(newScapRetentionPeriod);
        }
        if (!getOptionScapRetentionPeriodSet(request)) {
            org.getOrgConfig().setScapRetentionPeriodDays(null);
        }

        ActionMessages msg = new ActionMessages();
        msg.add(ActionMessages.GLOBAL_MESSAGE,
                new ActionMessage("message.org_name_updated",
                StringEscapeUtils.escapeHtml4(org.getName())));
        getStrutsDelegate().saveMessages(request, msg);
        return getStrutsDelegate().forwardParam(mapping.findForward("success"),
                RequestContext.ORG_ID,
                org.getId().toString());
    }
    return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
 
Example 19
Source File: TargetSystemsConfirmAction.java    From spacewalk with GNU General Public License v2.0 4 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
public ActionForward execute(ActionMapping mapping,
        ActionForm formIn,
        HttpServletRequest request,
        HttpServletResponse response) {

    RequestContext requestContext = new RequestContext(request);
    User user =  requestContext.getCurrentUser();

    Long cid = requestContext.getRequiredParam(RequestContext.CID);
    Channel chan = ChannelManager.lookupByIdAndUser(cid, user);
    request.setAttribute("channel_name", chan.getName());
    ListRhnSetHelper helper = new ListRhnSetHelper(this, request,
            TargetSystemsAction.getSetDecl(chan));
    helper.setWillClearSet(false);
    helper.execute();

    request.setAttribute("channel_name", chan.getName());
    request.setAttribute("cid", chan.getId());
    if (helper.isDispatched()) {
        RhnSet set = TargetSystemsAction.getSetDecl(chan).get(user);
        List<Server> servers = new ArrayList<Server>();
        for (Long id : set.getElementValues()) {
            Server s  = SystemManager.lookupByIdAndUser(id, user);
            SystemManager.subscribeServerToChannel(user, s, chan);
            servers.add(s);
        }
        Map<String, Object> params = new HashMap<String, Object>();
        params.put(RequestContext.CID, cid);
        ActionMessages msgs = new ActionMessages();
        if (servers.size() > 0) {
            msgs.add(ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("channeltarget.success", servers.size(),
                            chan.getName()));
            getStrutsDelegate().saveMessages(request, msgs);
        }

        return getStrutsDelegate().forwardParams(mapping.findForward("success"),
                params);
    }
    return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
 
Example 20
Source File: ActionListController.java    From rice with Educational Community License v2.0 4 votes vote down vote up
/**
 * Process taking mass action on action items
 *
 * <p>
 * Handles requests where the methodToCall parameter
 * is 'takeMassActions'.  Iterates through action items that have custom actions and process each selected action.
 * </p>
 *
 * @param form - ActionListForm form
 * @param result - Spring form binding result
 * @param request - http request
 * @param response - http response
 * @return start - forwards to the start method
 */
@RequestMapping(params = "methodToCall=takeMassActions")
protected ModelAndView takeMassActions(UifFormBase form){
    ActionListForm actionListForm = (ActionListForm) form;

    Object obj = ObjectPropertyUtils.getPropertyValue(form, "extensionData['actionInputField_actionSelect_line2']");

    List<? extends ActionItemBase> actionList = actionListForm.getActionList();
    if (actionList == null) {
        return getModelAndView(form);
    }

    ActionMessages messages = new ActionMessages();
    List<ActionInvocation> invocations = new ArrayList<ActionInvocation>();

    int index = 0;
    for (Object element : actionListForm.getActionsToTake()) {
        ActionToTake actionToTake = (ActionToTake) element;
        if (actionToTake != null && actionToTake.getActionTakenCd() != null &&
                !"".equals(actionToTake.getActionTakenCd()) &&
                !"NONE".equalsIgnoreCase(actionToTake.getActionTakenCd()) &&
                actionToTake.getActionItemId() != null) {
            ActionItemBase actionItem = getActionItemFromActionList(actionList, actionToTake.getActionItemId());
            if (actionItem == null) {
                LOG.warn("Could not locate the ActionItem to take mass action against in the action list: " + actionToTake.getActionItemId());
                continue;
            }
            invocations.add(ActionInvocation.create(ActionType.fromCode(actionToTake.getActionTakenCd()), actionItem.getId()));
        }
        index++;
    }

    KEWServiceLocator.getWorkflowDocumentService().takeMassActions(getUserSession().getPrincipalId(), invocations);
    messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.routing.processed"));

    org.kuali.rice.kew.actionlist.web.ActionListForm
            cleanForm = new org.kuali.rice.kew.actionlist.web.ActionListForm();
    actionListForm.setRequeryActionList(true);

    return start(actionListForm);
}