Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
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 Diagram | Right-click 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 Save button to display the value in the Allowable Values list box age could have the values: IsValidLicense() could return:
|
|
||||
4 |
Click on the OK button 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 context menu 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 OK button to cancel the dialog.
|
|
||||
6 |
To add another Rule Condition, right-click on the No column and select the Add Row context menu 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 context menu option.
|
|
||||
7 |
If any of the condition values invoke an action or a decision, you can define it as a Rule Action. |
|
Learn more
Learning Center topics
• | (Alt+F1) | Enterprise Architect | Business Modeling | Business Rules | Rule Composer |
• | (Alt+F1) | Enterprise Architect | Business Modeling | Business Rules | Decision Table |
• | (Alt+F1) | Enterprise Architect | Business Modeling | Business Rules | Rule Composer Example |