

package AOMCase;

import com.metamaxim.modelscope.callbacks.*;

public class CrisisClosable extends Behaviour {

    public String getState() {
		Instance[] myMissions = this.selectByRef("Mission Recommendation", "Crisis");
		boolean allDone = true;
		for (int i = 0; i < myMissions.length; i++) {
			if (myMissions[i].getState("Mission Recommendation").equals("recommended")
				 ||
			    myMissions[i].getState("Mission Recommendation").equals("confirmed")) allDone = false;
			}
		return allDone ? "no outstanding missions" : "outstanding missions";
		}

	public String getMissionsStatus() {
		return this.getState("Crisis Closable");
		}

}

