< Previous | Next >

Task 3: Testing the vocabulary in an action rule

You create and edit an action rule to test the business elements that you verbalized in the previous task.

About this task

As these instructions explain, store your rule artifacts in rule packages, and not directly in the rules folder.

Procedure

To test the vocabulary in an action rule:

  1. Create a rule package:

    Now you create the following action rule, which uses the vocabulary that is related to customers and rental agreements:

    if
       the duration of the rental agreement is more than 20
    then
       make it true that the customer of the rental agreement is loyalty program member; 
    1. In the Rule Explorer, select the vocabulary-rules > rules folder, and on the File menu, click New  > Rule Package.
    2. In the New Rule Package wizard, in the Package field, type Loyalty.
    3. Click Finish.

      The new rule package appears in the Rule Explorer view.

  2. Create the new action rule:

    In the Intellirule Editor, you type the contents of the rule into the Content section by using the Content Assist mechanism.

    1. Right-click the Loyalty package and click New  > Action Rule. The New Action Rule wizard opens.
    2. In the Name field, type AwardLoyalty, and then click Finish.

      The new action rule appears in the Rule Explorer view, and the Intellirule editor opens.

  3. Edit the action rule:
    1. In the Content section of the Intellirule editor, type if, and then press Enter.
    2. On the next line, press Ctrl+Spacebar to activate the Content Assist box.
    3. In the Content Assist box, select terms and phrases until you produce the following expression:
      the duration of the rental agreement is more than 20
    4. On the next line, type then, and then press Enter.
    5. In the Content Assist box, select terms and phrases until you produce the following expression:
      make it true that the customer of the rental agreement is loyalty program member; 
    6. Save your work.

      For more information on rule editors, see Working with action rules.

Results

In the next task, you extend the vocabulary with business elements that do not exist in the XOM, but can be mapped to it.

< Previous | Next >