0
.drl 규칙 파일에서 arrayList를 사용하고 있습니다. 하나의 규칙에서 나는 목록이 null인지 아닌지 확인하고 setFocus (2 번째 규칙)를 설정합니다. 2 규칙에서 나는 목록에서 요소를 얻고 있습니다.이 규칙에서 bt는 목록을 얻는 중 Null 오류입니다.DRools 규칙에서 Null 배열을 탐색하는 중 오류가 발생했습니다.
목록이 비어 있는지 확인하고 싶습니다. 하나의 규칙에서 그 arraylist의 특정 요소를 가져오고 싶습니다.
rule "Rule chesks client had already received Notifications or Not"
salience 10
no-loop true
when
event : Event($listOfClientNotifications : clientNotifications)
eval($listOfClientNotifications < 1)
then
event.setMessage("list is null");
end
2 규칙 : 널 오류가 발생하는 위치
rule "Rule chesks "
salience 05
no-loop true
when
event : Event($listOfClientNotifications : clientNotifications)
value : ClientNotifications() from $listOfClientNotifications; // <<< !!!
then
event.setMessage("Value "+**value.getMessage()**);
end
이 <<< !!!
입니다.