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 with multiple NOT nodes combined with AND operator
This is an example of a query business rule groups by multiple properties with multiple NOT nodes combined with AND operator.
// NOT Prop AND NOT Prop QueryNode rightNode = QueryNodeFactory.createPropertyQueryNode("department", QueryOperator.EQUAL, "accounting"); NotNode notNode = QueryNodeFactory.createNotNode(rightNode); QueryNode leftNode = QueryNodeFactory.createPropertyQueryNode("department", QueryOperator.LIKE, "cla%"); NotNode notNode2 = QueryNodeFactory.createNotNode(leftNode); AndNode andNode = QueryNodeFactory.createAndNode(notNode, notNode2); brgList = BusinessRuleManager.getBRGsByProperties(andNode, 0, 0); // Returns BRG1 and BRG2