ILOG JRules User Guide > Creating Rule Projects > Getting Started > Tutorial: Defining a Vocabulary > Step 2: Verbalize New Business Elements

You now need to update the BOM entry to include the missing classes in the BOM entry, but you do not want all their members to be verbalized automatically.

To update the BOM entry:

  1. In the Rule Explorer view, select the model in the bom folder.
  2. Right-click it, then click BOM Entry > Update.
  3. In the Update BOM Entry wizard, select the classes Branch, CarGroup, Offer, and Session. The class Session will be used later to display messages.
  4. Click Finish.
  5. The BOM Editor closes.
  6. In the Rule Explorer view, double-click the bom model to re-open the BOM Editor.
  7. In the BOM Editor, the classes you updated have been added to the BOM entry and the warnings should have disappeared from the Problems view.

To make these business elements visible from rules, you need to verbalize them. To select which elements you want to verbalize, you can use the Verbalize BOM wizard.

To verbalize business elements:

  1. In the BOM Editor, in the Tasks section of the Package page, click Verbalize the elements of this BOM entry.
  2. In the Verbalize BOM wizard, select the method Session.displayMessage. Leave the other selections as they are.
  3. Click Finish, and save your work.
  4. Expand the package in the BOM editor to see the verbalization of the new elements.
  5. They are also visible in the Vocabulary view. To open the Vocabulary view, from the Window menu select Show View > Vocabulary.

In the rules of the car rental policy, you will often need to declare variables as instances of BOM classes. To avoid having to declare these variables in each rule, you can generate an automatic variable for each BOM class that will be accessible from all the business rules in the rule project.

To generate automatic variables:

  1. In the Outline view, click the class Branch.
  2. In the BOM Editor, in the Class Verbalization section, select the box Generate automatic variable.
  3. Repeat these steps for all the classes in the package carrental.
  4. Save your work.
  5. Automatic variables are now defined for all the classes of the BOM.

In the next Step of the tutorial, you will create a rule package and a business rule to test your vocabulary in the Intellirule Editor.

Next Next: Step 3: Test the Vocabulary in a Business Rule