자동 예외 처리의 예
조건의 자동 예외 처리를 사용으로 설정하면, 예외가 처리된 후 규칙 처리가 계속될 수 있도록 규칙 엔진에서 처리되는 특정 서브클래스를 엔진에서 처리합니다.
조건의 자동 예외 처리를 통해, 부울 표현식의 알 수 없는 값은 예외를 초래할 수 있는 부울 표현식의 모든 조합에 대해 적용되는 다음 세 개의 값이 있는 로직을 사용하여 분석됩니다.

단순 규칙 조건
다음 예제에서, 대출자의 상태를 알 수 없는 경우 규칙 조치가 실행되지 않습니다.
if
the status of 'the borrower' starts with "duplicate"
then
reject 'the loan' ;
add "duplicate detected" to the messages of 'the loan' ;
else
add "no duplicate found" to the messages of 'the loan' ;
OR 연산자를 사용하는 규칙 조건
다음 예제에서, 대출자의 상태를 알 수 없고 대출의 주석에 duplicate 단어가 포함된 경우, 대출이 거부되고 duplicate detected 메시지가 전송됩니다.
if
the status of 'the borrower' starts with "Duplicate" or the comment of 'the loan' contains "duplicate"
then
reject 'the loan' ;
add "duplicate detected" to the messages of 'the loan' ;
else
add "no duplicate found" to the messages of 'the loan' ;
그러나, 대출자의 상태를 알 수 없고 주석을 알 수 없는 경우 규칙 조치가 수행되지 않습니다. 대출이 거부되지 않고 no duplicate found 메시지가 대출에 추가되지 않습니다.
AND 연산자를 사용하는 규칙 조건
다음 예제에서, 대출자의 상태를 알 수 없고 대출의 주석에 duplicate 단어가 포함된 경우, then 및 else 조치가 둘 다 수행되지 않습니다. 다시 말해서, 대출이 거부되지 않고 no duplicate found 메시지가 대출의 메시지에 추가되지 않습니다.
if
the status of 'the borrower' starts with "duplicate" and the comment of 'the loan' contains "duplicate"
then
reject 'the loan' ;
add "duplicate detected" to the messages of 'the loan' ;
else
add "no duplicate found" to the messages of 'the loan' ;
대출이 거부되려면 두 표현식이 모두 참이어야 합니다.
If there is no ... then ...
과거 대출자의 콜렉션에 where 절이 알 수 없음인 대출자가 포함된 경우 규칙 조치가 수행되지 않습니다.
If there is no borrower in the past borrowers of 'the loan' where the name of this borrower is the name of 'the borrower',
then
add "no duplicate found" to the message of 'the loan'
If there is at least one ... then ...
과거 대출자의 콜렉션에 where 절이 참인 대출자가 포함된 경우 규칙 조치가 수행됩니다. 과거 대출자의 콜렉션에 where 절이 거짓 또는 알 수 없음인 대출자가 포함된 경우 규칙 조치가 수행되지 않습니다.
If there is at least one borrower in the past borrowers of 'the loan' where the name of this borrower is the name of 'the borrower',
then
reject 'the loan' ;
add "duplicate detected" to the message of 'the loan'
NOT 연산자를 사용하는 규칙 조건
다음 예제에서, 상태를 알 수 없고 주석에 duplicate가 포함되지 않은 경우, then 조치가 수행되고 no duplicate found입니다.
if it is not true that
(the status of 'the borrower' starts with "duplicate" and the comment of 'the loan' contains "duplicate")
then
add "no duplicate found" to the messages of 'the loan' ;
else
reject 'the loan' ;
add "duplicate detected" to the messages of 'the loan' ;
상태를 알 수 없고 주석에 duplicate가 포함된 경우, 규칙 조치가 실행되지 않습니다.
의사결정 테이블
다음 예제에서, 열의 모든 기타 조건이 거짓이면 조건 열에 대한 그 외의 경우 행이 선택됩니다. 또는, 기타 조건 중 하나를 알 수 없으면 그 외의 경우 행이 선택되지 않습니다.

규칙 변수
규칙 변수 'statusIsNew'가 알 수 없음인 경우, 규칙 엔진이 표현식의 평가를 중지합니다. 조건이 알 수 없음으로 간주되고 규칙 조치가 수행되지 않습니다.
definitions
set 'statusIsNew' to the status of 'the borrower' starts with “New";
if it is not true that 'statusIsNew' and the comment of 'the loan' contains "similar"
then
reject 'the loan' ;
add "duplicate detected" to the messages of 'the loan' ;
else
add "no duplicate found" to the messages of 'the loan' ;
오브젝트의 콜렉션
콜렉션 오브젝트가 이행해야 하는 테스트에 알 수 없는 값이 있는 경우, 이 오브젝트는 콜렉션에 추가되지 않습니다.
definitions
set 'duplicateBorrowers' to all borrowers where the status of each borrower starts with "duplicate" ;
지원되지 않는 비즈니스 언어의 표현식
다음 예제에서, where 절이 3개의 대출자에 대해 참이고 하나의 대출자에 대해 알 수 없음인 경우 규칙 엔진은 where 절이 알 수 없음인 대출자가 계산되지 않으므로 조건이 참이라고 간주합니다. then 조치가 수행됩니다.
If there are at most 3 borrowers in the past borrowers of 'the loan' where the name of each borrower is the name of 'the borrower',
then
add “3 or less similar borrowers found" to the messages of 'the loan' ;
else
'대출' 거부; add “more than 3 similar borrowers found" to the messages of 'the loan' ;
다음 예제에서, where 절이 하나의 대출자에 대해 참이고 2개의 대출자에 대해 알 수 없음인 경우 규칙 엔진은 where 절이 알 수 없음인 2개의 대출자가 계산되지 않으므로 규칙 조건이 거짓이라고 간주합니다. else 조치가 수행됩니다.
if there are at least 3 borrowers in the past borrowers of 'the loan' where the name of each borrower is the name of 'the borrower',
then
'대출' 거부; add “3 or more similar borrowers found" to the messages of 'the loan' ;
else
add “less than 3 similar borrowers found" to the messages of 'the loan' ;