001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kew.engine;
017
018 import org.kuali.rice.kew.engine.node.RouteNodeInstance;
019
020 import java.util.ArrayList;
021 import java.util.List;
022
023 /**
024 * Maintains context of the main processing loop of the workflow engine. Essentially
025 * contains a List of node instances which need to be processed. After a node instance
026 * is processed from the context, the engine will check the status of the complete
027 * flag to determine whether processing should continue or halt.
028 *
029 * @author Kuali Rice Team (rice.collab@kuali.org)
030 */
031 public class ProcessContext {
032
033 private boolean complete = true;
034 private final List<RouteNodeInstance> nextNodeInstances;
035
036 public ProcessContext() {
037 this(true, new ArrayList<RouteNodeInstance>());
038 }
039
040 public ProcessContext(boolean complete, List<RouteNodeInstance> nextNodeInstances) {
041 this.complete = complete;
042 this.nextNodeInstances = nextNodeInstances;
043 }
044
045 public List<RouteNodeInstance> getNextNodeInstances() {
046 return nextNodeInstances;
047 }
048
049 public boolean isComplete() {
050 return complete;
051 }
052
053 public void setComplete(boolean complete) {
054 this.complete = complete;
055 }
056
057 }