1 /** 2 * Copyright 2005-2012 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; 17 18 import org.kuali.rice.kew.engine.node.RouteNodeInstance; 19 20 import java.util.ArrayList; 21 import java.util.List; 22 23 /** 24 * Maintains context of the main processing loop of the workflow engine. Essentially 25 * contains a List of node instances which need to be processed. After a node instance 26 * is processed from the context, the engine will check the status of the complete 27 * flag to determine whether processing should continue or halt. 28 * 29 * @author Kuali Rice Team (rice.collab@kuali.org) 30 */ 31 public class ProcessContext { 32 33 private boolean complete = true; 34 private final List<RouteNodeInstance> nextNodeInstances; 35 36 public ProcessContext() { 37 this(true, new ArrayList<RouteNodeInstance>()); 38 } 39 40 public ProcessContext(boolean complete, List<RouteNodeInstance> nextNodeInstances) { 41 this.complete = complete; 42 this.nextNodeInstances = nextNodeInstances; 43 } 44 45 public List<RouteNodeInstance> getNextNodeInstances() { 46 return nextNodeInstances; 47 } 48 49 public boolean isComplete() { 50 return complete; 51 } 52 53 public void setComplete(boolean complete) { 54 this.complete = complete; 55 } 56 57 }