IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Business rule management programming > Examples > Additional Query Examples

Query business rule groups by a list of nodes that are combined with an OR operator

This is an example of a query business rule groups by a list of nodes that are combined with an OR operator.

// OR list
List<QueryNode> list = new ArrayList<QueryNode>();

QueryNode rightNode =
QueryNodeFactory.createPropertyQueryNode("region", 		QueryOperator.LIKE, 		"%thRegion");

list.add(rightNode);

QueryNode rightNode2 =
QueryNodeFactory.createPropertyQueryNode("organization", 		QueryOperator.LIKE, 		"8%");

list.add(rightNode2);

QueryNode leftNode =
QueryNodeFactory.createPropertyQueryNode("department", 		QueryOperator.LIKE, 		"%ing");

list.add(leftNode);

OrNode orNode = QueryNodeFactory.createOrNode(list);

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

//Returns BRG3

Additional Query Examples