문장을 비교하는 조건
이벤트 및 엔티티의 속성, 그리고 숫자 및 부울(true 또는 false) 값, 날짜, 텍스트 문자열을 비교하고 조작하는 조건을 빌드할 수 있습니다.
다음 예에서는 일부 텍스트, 숫자 및 시간 연산자를 예시합니다.
규칙에서 사용 가능한 연산자의 목록을 보려면 비즈니스 규칙 언어를 참조하십시오.
- starts with 및 ends with
텍스트 연산자 starts with 및 ends with를 사용하여 텍스트 문자열이 특정 문자 시퀀스로 시작하거나 종료하는지 여부를 판별할 수 있습니다.
if the maintenance number of 'the customer' starts with “TX” then print "redirect the call to call center A";
- is more than 및 is less than
수치 연산자 is more than 및 is less than을 사용하여 두개의 숫자 값을 비교할 수 있습니다.
if the purchase value of 'the shopping cart' is more than $100 then print "apply a 10% discount to the value of the shopping cart";
- after 및 before
날짜 및 시간 연산자 after 및 before, 그리고 기타 연산자를 사용하여 시점을 비교할 수 있습니다.
definitions set 'the pickup date' to the pickup date of 'the rented car'; set 'the scheduled return date' to the scheduled return date of 'the rented car'; if the return date of 'the rented car' is after 'the pickup date' and before 'the scheduled return date' then...다음 규칙은 에이전트가 리턴 이벤트를 수신할 때만 적용됩니다.
when a return event occurs, called 'the return' definitions set 'the purchase' to a purchase event; if 'the return' is after the period of 1 week after 'the purchase' then...
시간 및 위치 비교에 대한 자세한 정보는 시간 및 이벤트에 대한 추론 및 지리적 위치에 대한 추론의 내용을 참조하십시오.