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 OR operator

This is an example of a query business rule groups by multiple properties with multiple NOT nodes combined with OR operator.

// NOT Prop OR NOT Prop
QueryNode rightNode =
QueryNodeFactory.createPropertyQueryNode("department", 		QueryOperator.LIKE, "acc%");

NotNode notNode =
QueryNodeFactory.createNotNode(rightNode);

QueryNode leftNode =
QueryNodeFactory.createPropertyQueryNode(
		"department", QueryOperator.EQUAL, 		"claims");

NotNode notNode2 =
QueryNodeFactory.createNotNode(leftNode);

OrNode orNode = QueryNodeFactory.createOrNode(notNode, notNode2);

brgList = BusinessRuleManager.getBRGsByProperties(orNode, 0, 0);

//Returns BRG1, BRG2, BRG3, and BRG4

Additional Query Examples