Prev | Next |
Define Rule Conditions
When you create the Business Domain model, you set up a number of Classes that define the business terms and entities (such as Customer) and their associated attributes and operations. You create the attributes and operations as you set up the Class, with at least some values or parameters, and you tailor some of the features to the rules to define the conditions through which a rule takes effect, in the Rule Conditions table.
For example, in a Class that defines the properties of Car, the attribute Type might be used to set the condition 'Car is: Small, Medium or Large', through which the rules defining base rental charge would be filtered and applied.
Access
Context Menu |
Open diagram | Right-click on a Rule Task element | Rule Composer > Decision Table |
Model Rule Conditions
Step |
Action |
See also |
---|---|---|
1 |
From the appropriate Class element in the Project Browser, drag and drop the condition attribute (such as age) or operation (such as IsValidLicense()) onto the first empty field in the 'Rule Conditions' column.
|
|
2 |
Determine a range of accepted values for the Rule Condition. |
|
3 |
Right-click on the 'Allowable Values' column and select:
Type each required value or range of values in the 'Value' field, and click on the to display the value in the 'Allowable Values' list box age could have the values:
IsValidLicense() could return:
|
|
4 |
Click on the to save the values and close the dialog; for an attribute, a new constraint AllowableValues is created.
|
|
5 |
If the Rule Condition is an operation, you can pass parameters to it. Right-click on the 'Allowable Values' field, and select the 'Edit Parameters' option; the 'Edit Parameters' dialog displays, listing the parameters that already exist for the operation. Select the parameters and type their values into the 'Value' text box; click on the to cancel the dialog.
|
|
6 |
To add another Rule Condition, right-click on the 'No' column and select the 'Add Row' option; an empty row is added to the table. To remove a Rule Condition from the table, right-click on the appropriate 'No' field and select the 'Delete Row' option.
|
|
7 |
If any of the condition values invoke an action or a decision, you can define it as a Rule Action. |
Define Rule Actions |
Learn more