1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.class1.process.krms.proposition; |
17 | |
|
18 | |
import org.kuali.rice.krms.api.engine.ExecutionEnvironment; |
19 | |
import org.kuali.rice.krms.api.engine.ResultEvent; |
20 | |
import org.kuali.rice.krms.framework.engine.PropositionResult; |
21 | |
import org.kuali.rice.krms.framework.engine.result.BasicResult; |
22 | |
import org.kuali.student.common.util.krms.RulesExecutionConstants; |
23 | |
import org.kuali.student.common.util.krms.proposition.AbstractLeafProposition; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | 0 | public class PersonLivingProposition extends AbstractLeafProposition { |
31 | |
|
32 | |
@Override |
33 | |
public PropositionResult evaluate(ExecutionEnvironment environment) { |
34 | 0 | Boolean isStudentDeceased = environment.resolveTerm(RulesExecutionConstants.studentDeceasedTerm, this); |
35 | |
|
36 | 0 | PropositionResult result = new PropositionResult(!isStudentDeceased); |
37 | |
|
38 | 0 | environment.getEngineResults().addResult(new BasicResult(ResultEvent.PROPOSITION_EVALUATED, this, environment, result.getResult())); |
39 | |
|
40 | 0 | return result; |
41 | |
} |
42 | |
|
43 | |
|
44 | |
} |