You learn how to update the BOM entry, verbalize your business
elements and generate automatic variables.
About this task
You now need to update the BOM entry to include
the missing classes, but you do not want all of them to be verbalized
automatically.
Procedure
To update the BOM entry and generate
automatic variables:
- Update the BOM entry:
- In the Rule Explorer view, expand the bom folder,
right-click the model, and then select BOM
Update.
- In the BOM Update view, clear
all the check boxes to deselect all the classes, and then select the
following XOM classes:
- Branch
- CarGroup
- Offer
- Session
- Expand Differences and Actions,
select Bulk: Import XOM Class (4) from the Actions list,
and then click Perform and save to import the
four XOM classes.
When the build
is complete, the Verbalize BOM dialog opens.
- In the Verbalize BOM dialog,
select the method Session.displayMessage. Leave
the other selections as they are.
- Click Finish.
- In the BOM Editor (which displays the BOM entry), expand
the package to see the verbalization of the new elements.
The Vocabulary view also shows the new elements.
To open the Vocabulary view, go to the Window menu
and select .
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.In the car rental policy rules, you need
to declare variables as instances of BOM classes. To avoid having to declare these variables in each
rule, you can generate automatic variables. Automatic variables are variables that you declare as an
instance of a specific BOM class. Then, they are accessible from all the business rules in the rule
project.
- Generate automatic variables:
- In the Outline view, click the class Branch.
- In the BOM Editor, in the Class Verbalization section,
select Generate automatic variable.
- Repeat these steps for each class in the carrental package.
- Save your work.
Automatic
variables are now defined for all the classes of the BOM.
Results
In the next task, you create a rule package and
use the Intellirule editor to create an action rule to test your vocabulary.