How to write logical statements in Business Rule Engine?

How to write logical statements in Business Rule Engine?

Business rule always consists of multiple/single rule put on LHS and RHS side.

Features of Business Rule?

  • Supports multiple operators like AND, OR, !=, GT, LT, GT=, LT=, IN, NOTIN, COUNT, SUBSTR, CALCULATE.
  • Ability to resolve any complex path containing above operators than giving final result in true or false.

Use case?

  • To Show/Hide any field in Front-End on basis of result of Business Rule.
  • Restrict to navigate to Tab on like OV screen on basis of BR result.
  • Restrict to next task perform on any action on basis of BR result.

Operators use in Business Rule?

S.NO Operators Replace Operators in Front-end code from operators Description
S.NO Operators Replace Operators in Front-end code from operators Description
1 AND && checks both of the statements must be true otherwise false
2 OR checks either one of the statement must be true otherwise false
3 = == comparing value will be true if both values are same otherwise false
4 != != comparing value will be true if both values(LHS and RHS) are not same otherwise false
5 GT > return true if value is greater than other value otherwise false
6 GT= >= return true if value is greater than and equal to other value otherwise false
7 LT < return true if value is smaller than to other value otherwise false
8 LT= <= return true if value is smaller than and equal to other value otherwise false
9 IN NA return true if either one value in IN operator mathes RHS value otherwise false
10 NOTIN NA return true if all values in NOTIN operator not matches RHS value otherwise false
11 COUNT NA return true if length of string in COUNT operator or string evaluated by path is same as the RHS/LHS value otherwise false
12 SUBSTR NA return true if Substring of string in SUBSTR method will be same as the string of RHS/LHS value otherwise false
13 CALCULATE NA calculate the moth/year/days given in CALCULATE method and than compare the LHS/RHS value wrt to opertor given for comparison