1
2
3
4
5
6
7
8
9
10
11 package org.kuali.student.core.krms.proposition;
12
13 import java.util.Date;
14 import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
15 import org.kuali.rice.krms.api.engine.ResultEvent;
16 import org.kuali.rice.krms.framework.engine.PropositionResult;
17 import org.kuali.rice.krms.framework.engine.result.BasicResult;
18 import org.kuali.student.common.util.krms.RulesExecutionConstants;
19 import org.kuali.student.common.util.krms.proposition.AbstractLeafProposition;
20
21
22
23
24
25
26 public class IsAliveProposition extends AbstractLeafProposition {
27
28 @Override
29 public PropositionResult evaluate(ExecutionEnvironment environment) {
30 Date deceasedDate = environment.resolveTerm(RulesExecutionConstants.STUDENT_DECEASED_DATE_TERM, this);
31
32 if (deceasedDate == null) {
33 return this.recordResultWithNoDetails(environment, true);
34 }
35 return this.recordResultWithNoDetails(environment, false);
36 }
37 }