규칙 변수에서 규칙 조치의 종속성

오브젝트가 규칙 변수를 인스턴화할 수 없으면 규칙 조치를 실행할 수 없습니다.

규칙의 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