규칙 변수에서 규칙 조치의 종속성
규칙의 변수를 오브젝트로 인스턴스화할 수 없는 경우 규칙 조치를 실행할 수 없습니다.
규칙의 definitions 파트에서 규칙 변수를 정의합니다. 규칙의 변수를 오브젝트로 인스턴스화할 수 없는 경우 해당 규칙을 실행하거나 조치를 수행할 수 없습니다.
규칙에 변수 및 조건이 있으며 변수를 오브젝트로 인스턴스화할 수 없고 조건이 true가 아닌 경우 해당 규칙은 else 파트만 실행할 수 있습니다.
모든 고객이 5% 이상의 할인을 받기 때문에 다음 규칙은 항상 할인율을 적용합니다.
if all of the following conditions are true: the value of the customer's shopping cart is more than $100 the category of the customer is Gold then apply a 15% discount else apply a 5% discount
그러나 골드 카테고리의 고객에게만 할인을 제공하기 위해 definitions 파트를 사용하여 규칙을 변경할 수 있습니다.
definitions set applicant to a customer where the category of this customer is Gold if the value of the applicant's shopping cart is more than $100 then apply a 15% discount else apply a 5% discount