1 /** 2 * Copyright 2005-2015 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.kew.engine.node; 17 18 import org.kuali.rice.kew.actionitem.ActionItem; 19 import org.kuali.rice.kew.actionrequest.service.impl.NotificationSuppression; 20 import org.kuali.rice.kew.engine.RouteContext; 21 22 import java.util.List; 23 24 /** 25 * Abstract superclass for request activation node types. 26 * 27 * @author Kuali Rice Team (rice.collab@kuali.org) 28 */ 29 public abstract class RequestActivationNodeBase implements SimpleNode { 30 31 /** 32 * This method takes care of notification for ActionItems. 33 * 34 * <p>It has logic for suppressing notifications a) 35 * during simulations, and b) when the RouteNodeInstance has NodeState specifically hinting for notification 36 * suppression for a given ActionItem.</p> 37 * 38 * <p>A side effect during non-simulation calls is that any notification suppression NodeStates will be removed 39 * from the RouteNodeInstance after notifications are sent.</p> 40 * 41 * @param context the routing context in which to perform the notification 42 * @param actionItems the list of action items for which to dispatch notifications 43 * @param routeNodeInstance the node instance at which the notifications are being sent 44 */ 45 protected void notify(RouteContext context, List<ActionItem> actionItems, RouteNodeInstance routeNodeInstance) { 46 if (!context.isSimulation()) { 47 new NotificationSuppression().notify(actionItems, routeNodeInstance); 48 } 49 } 50 51 }