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:
- 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;
- In the Rule Explorer, select the folder, and on the File menu,
click .
- In the New Rule Package wizard, in the Package field,
type Loyalty.
- Click Finish.
The new rule package appears in the Rule Explorer
view.
- 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.
- Right-click the Loyalty package
and click . The New Action Rule wizard opens.
- 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.
- Edit the action rule:
- In the Content section of the Intellirule editor, type if, and then press Enter.
- On the next line, press Ctrl+Spacebar to activate the
Content Assist box.
- 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
- On the next line, type then,
and then press Enter.
- 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;
- 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.