ILOG JRules User Guide > Creating Rule Projects > Getting Started > Tutorial: Defining a Vocabulary > Step 5: Refine the Vocabulary

In the rule UnderAge, the phrases that need improvement are:

You can modify the default verbalization of these phrases.

The phrase the customer age of the rental agreement may be confusing because it seems to associate age and rental agreement. To make it less ambiguous, you can edit the term customer age, which is called the subject of this phrase.

To improve the verbalization of the subject:

  1. In the Outline view, click the method getCustomerAge.
  2. In the Member Verbalization section, click Edit the subject used in phrases.
  3. The Edit Term dialog opens.
  4. In the Singular field, change the text to: age of the customer. Click OK.
  5. In the BOM Editor, the navigation phrase has changed, and a warning message appears telling you that these changes may impact your rules.
  6. On the File menu, click Save.
  7. The Refactor Vocabulary dialog opens.
  8. Make sure the rule UnderAge is selected, and click Yes.
  9. Open the rule UnderAge.
  10. This rule is now updated with the new verbalization.

Methods with arguments such as Session.displayMessage are verbalized by default without many modifications. You need to modify the verbalization of these methods.

To improve the verbalization of a method with arguments:

  1. Open the rule UnderAge in the Intellirule Editor.
  2. Press CTRL and click the session . displayMessage ( "The rental agreement is rejected."); which appears as a link.
  3. The Member page of the BOM Editor opens.
  4. In the Member Verbalization section, delete the contents of the action phrase Template field.
  5. You are going to replace it with the following phrase:
  6. display the message {0} in {this}
    Begin by typing: display the message, then press CTRL+SPACEBAR to activate the Content Assist box.
  7. In the Content Assist box, select {0} and press ENTER.
  8. Continue replacing the action phrase using Content Assist until you have entered the complete phrase.
  9. A warning message appears telling you that these changes may impact the business rules.
  10. On the File menu, click Save.
  11. The Refactor Vocabulary dialog opens.
  12. Make sure the rule UnderAge is selected, and click Yes.
  13. Open the rule UnderAge. As you can see, it is now updated with the new verbalization:
if 
   the age of the customer of the rental agreement is less than 18
then
   make it true that the rental agreement is rejected; 
   display the message "The rental agreement is rejected" in the session;

In the next Step of the tutorial, you will extend the BOM with an enumerated domain that appears as a drop-down list in business rules.

Next Next: Step 6: Create a Domain