Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package org.kuali.rice.kew.actions;
 import java.util.List;

Does a node level super user approve action. All approve/complete requests outstanding for this node are satisfied by this action.

Kuali Rice Team (
     private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(SuperUserNodeApproveEvent.class);
     private String nodeName;
     public SuperUserNodeApproveEvent(DocumentRouteHeaderValue routeHeaderPrincipalContract principal) {
     public SuperUserNodeApproveEvent(DocumentRouteHeaderValue routeHeaderPrincipalContract principalString annotationboolean runPostProcessorString nodeName) {
         this. = nodeName;
     public void recordAction() throws InvalidActionTakenException {
         if (org.apache.commons.lang.StringUtils.isEmpty()) {
             throw new InvalidActionTakenException("No approval node name set");
         DocumentType docType = getRouteHeader().getDocumentType();
         String errorMessage = super.validateActionRules();
         if (!org.apache.commons.lang.StringUtils.isEmpty(errorMessage)) {
             .info("User not authorized");
             List<WorkflowServiceErrorImplerrors = new ArrayList<WorkflowServiceErrorImpl>();
             errors.add(new WorkflowServiceErrorImpl(errorMessage.));
             throw new WorkflowServiceErrorException(errorMessageerrors);
         ActionTakenValue actionTaken = saveActionTaken();
             if (getRouteHeader().isInException()) {
                 .debug("Moving document back to Enroute from Exception");
                 String oldStatus = getRouteHeader().getDocRouteStatus();
                 String newStatus = getRouteHeader().getDocRouteStatus();
             try {
             	BlanketApproveEngine blanketApproveEngine = KEWServiceLocator.getWorkflowEngineFactory().newEngine(config);
     			blanketApproveEngine.process(getRouteHeader().getDocumentId(), null);
             } catch (Exception e) {
             	if (e instanceof RuntimeException) {
         		throw (RuntimeException)e;
         	} else {
         		throw new WorkflowRuntimeException(e.toString(), e);
    protected void markDocument() throws WorkflowException {
        // do nothing since we are overriding the entire behavior
New to GrepCode? Check out our FAQ X