ILOG JRules User Guide > Creating Rule Projects > Concepts > Categories

A category is an identifier that can be applied to business classes and members and filtered in business rules. It enables you to specify whether a business element can be used in a specific rule. A business element can be used in a rule when at least one of the categories of the business element has been specified on the rule.

Using categories enables policy managers to write business rules only against business elements whose categories match the category filter of the rule. It also reduces the number of elements available in the rule editor drop-down list.

By default, the predefined category any is set on all business elements except those of the system BOM, which have no category. The any category can be seen in all rules, whatever the rule category filter in use. Thus by default all business elements can be used in all business rules.

When no category is defined on a business element (not even the category any), this business element cannot be used in any of the business rules that use the BOM to which the business element belongs.

Table 1 Category Usage Summary
If a business element has the category... 
And in a business rule the category filter is... 
Then, in that business rule, the business element is... 
any 
any or another category 
visible 
any or another category 
any 
visible 
category1 and category2 
category1 and category2 
visible 
category1 and category2 
category3 and category4 
hidden 
none 
any or another category 
hidden 
any or another category 
none 
hidden 

Example

In your BOM, there is a Car class which is assigned a vehicle category. There is also a business rule CarRentalRule in your rule project that has vehicle in its category filter. From CarRentalRule, you can see all the classes that have the category vehicle (therefore the Car class), as well as all classes that have the any category.

If you then define a category sales and assign it to a class Customer, you will not see the Customer class in the rule editor drop-down list for the rule CarRentalRule. If you still decide to use the Customer class in the business rule, it will be reported as a warning.

Categories

Similarly, if the Car class has a member that is assigned to a category other than vehicle, you cannot use this member in the conditions and actions for CarRentalRule, even though you can use it in the definitions part of the rule.

Related Concepts

Vocabulary

Related Tasks

Defining Categories
Setting Up Automatic Variables

Related Reference

BOM Editor

Related Samples and Tutorials

Tutorial: Defining a Vocabulary