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 java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.kew.actionitem.ActionItem;
22 import org.kuali.rice.kew.actionrequest.ActionRequestValue;
23 import org.kuali.rice.kew.actionrequest.service.impl.NotificationSuppression;
24 import org.kuali.rice.kew.engine.RouteContext;
25 import org.kuali.rice.kew.service.KEWServiceLocator;
26
27 /**
28 * Abstract superclass for request activation node types
29 *
30 * @author Kuali Rice Team (rice.collab@kuali.org)
31 *
32 */
33 public abstract class RequestActivationNodeBase implements SimpleNode {
34
35 /**
36 *
37 * <p>This method takes care of notification for ActionItemS. It has logic for suppressing notifications a)
38 * during simulations, and b) when the RouteNodeInstance has NodeState specifically hinting for notification
39 * suppression for a given ActionItem.
40 *
41 * <p>A side effect during non-simulation calls is that any notification suppression NodeStateS will be removed
42 * from the RouteNodeInstance after notifications are sent.
43 *
44 * @param context
45 * @param actionItems
46 * @param actionRequests
47 * @param routeNodeInstance
48 */
49 protected void notify(RouteContext context, List<ActionItem> actionItems, RouteNodeInstance routeNodeInstance) {
50
51 if (!context.isSimulation()) {
52 new NotificationSuppression().notify(actionItems, routeNodeInstance);
53 }
54 }
55
56 }