Guest User

Untitled

a guest
Jan 22nd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. // Department's maximumAge constraint
  2. rule "departmentMaximumAge"
  3. when
  4. $department : Department(maximumAge != null, $maximumAge : maximumAge)
  5. $bedDesignation : BedDesignation(department == $department, patientAge > $maximumAge)
  6. then
  7. // Note: the original spec classified this as a soft constraint
  8. scoreHolder.addHardConstraintMatch(kcontext, -100 * $bedDesignation.getAdmissionPartNightCount());
  9. end
  10.  
  11. org.kie.api.runtime.KieContext', required: 'org.kie.api.runtime.rule.RuleContext'
  12.  
  13. Exception executing consequence for rule "distanceToLastLocation" in score: java.lang.NullPointerException
  14.  
  15. rule "distanceToLastLocation"
  16. when
  17. $cargo : Cargo(vesselComesFromCargoLocation != null, $distanceToLastLocation: distanceToLastLocation)
  18. then
  19. scoreHolder.addSoftConstraintMatch(kcontext, -$distanceToLastLocation.longValue()); end
Add Comment
Please, Sign In to add comment