IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Business rule management programming > Examples > Additional Query Examples
Query business rule groups by multiple properties combined with NOT and OR operators
This is an example of a query business rule groups by multiple properties combined with NOT and OR operators.
// NOT (Prop AND Prop) OR Prop QueryNode rightNode = QueryNodeFactory.createPropertyQueryNode("organization", QueryOperator.LIKE, "8_A_"); QueryNode rightNode2 = QueryNodeFactory.createPropertyQueryNode("organization", QueryOperator.LIKE, "7%"); QueryNode leftNode2 = QueryNodeFactory.createPropertyQueryNode("region",QueryOper ator.LIKE, "%lRegion"); AndNode andNodeRight = QueryNodeFactory.createAndNode(leftNode2,rightNode2); NotNode notNode = QueryNodeFactory.createNotNode(andNodeRight); OrNode orNode = QueryNodeFactory.createOrNode(notNode, rightNode); brgList = BusinessRuleManager.getBRGsByProperties(orNode, 0, 0); // Returns BRG3