Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Department's maximumAge constraint
- rule "departmentMaximumAge"
- when
- $department : Department(maximumAge != null, $maximumAge : maximumAge)
- $bedDesignation : BedDesignation(department == $department, patientAge > $maximumAge)
- then
- // Note: the original spec classified this as a soft constraint
- scoreHolder.addHardConstraintMatch(kcontext, -100 * $bedDesignation.getAdmissionPartNightCount());
- end
- org.kie.api.runtime.KieContext', required: 'org.kie.api.runtime.rule.RuleContext'
- Exception executing consequence for rule "distanceToLastLocation" in score: java.lang.NullPointerException
- rule "distanceToLastLocation"
- when
- $cargo : Cargo(vesselComesFromCargoLocation != null, $distanceToLastLocation: distanceToLastLocation)
- then
- scoreHolder.addSoftConstraintMatch(kcontext, -$distanceToLastLocation.longValue()); end
Add Comment
Please, Sign In to add comment