Prev Next

Model Business Rules

In the Business Rules Model, you initially define each business rule as a Business Rule element and later group these rules by linking them (using Dependency connectors) with Rule Task elements. In the:

  • First stage you assemble a collection of rules
  • Second stage you organize the rules into groups and sequences through the Rule Task elements created in the Business Domain model, and refine them by adding further Business Rule elements (and, if appropriate, further Rule Task elements)

In the Car Rental example in the EAExample model, rules have been defined and grouped to perform an eligibility check on a customer, to determine if the customer is eligible to rent a car.

Define Business Rule elements

Step

Action

See also

1

In the generated Business Rules Model, expand the Business Rules Package and double-click on the Business Rules diagram to open it. The diagram shows two example Business Rule elements connected to an example Rule Task.

In the Diagram Toolbox, the 'Rule Model' pages display.

2

If you should need to create another (empty) Business Rules diagram, right-click on the Business Rules Package and select 'Add Diagram'.

On the 'New Diagram' dialog, type an appropriate name in the 'Diagram' field, click on the 'Select From' header and select the 'Project Management > Complete' Perspective group, and then scroll down and select the Business Rule Model Perspective from the panel beneath the header.

Select 'Rule Model' in the 'Diagram Types' panel and click on the OK button.

3

For each business rule you want to identify, drag the 'Business Rule' icon from the Toolbox.

Type the rule (or a shortened version of it) in the 'Short Description' field of the element 'Properties' dialog. This displays as the name of the element in the diagram.

You will later define the parameters of the rules using the Rule Composer.

Compose Business Rules

4

When you have created all the required Business Rule elements, create the Business Domain model, the Rule Flow Activity diagram and the Business Task elements.

Create a Business Domain Model

Associate Business Rules with Business Tasks

After you have created the Business Domain Model and Rule Flow Activity (which contains the Rule Task elements in the context of the business process), you can link the Business Rule elements to the Rule Task for the action in which the rules take effect. You can apply a Business Rule to more than one Rule Task, if it has an effect in different contexts.

There are several ways to establish the relationship between Business Rule and Rule Task.

Method

Action

See also

Use the Business Rules diagram

Open the Business Rules diagram and drag onto it a Rule Task element from the RuleFlow Activity in the Project Browser.

Create a Dependency relationship to the Rule Task from each Business Rule element that applies to it (by dragging the connector from the Toolbox, or by using the Quick Linker arrow on the Business Rule element).

Repeat the process for the next Rule Task element from the Rule Flow Activity.

Create any additional Business Rule and Rule Task elements that are necessary (this should not be a common event); you must add any new Rule Tasks to the Rule Flow Activity diagram.

Save the diagram and open the Rule Composer for the first Rule Task element.

Create a Rule Flow Activity Compose Business Rules

Assemble existing elements through the Rule Composer

In the Project Browser, open the Rule Composer on a Rule Task element, and drag each applicable Business Rule element from the Project Browser into an empty row of the Rule Statements table.

This establishes a Dependency relationship between the Rule Task element and each Business Rule element.

Continue to compose the rule conditions.

Compose Business Rules

Use the Relationship Matrix

You can quickly create all the Dependency relationships between a number of Rule Task elements in the Business Domain Model Package and the Business Rule elements that apply to each one.

Set the source element 'Type' to 'BusinessRule' and the target element 'Type' to 'RuleTask'.

Set 'Link Type' to 'Dependency', and 'Direction' to 'Source->Target'.

Set the 'Source Package' to 'Business Rules' and the 'Target' to 'Business Domain Model'.

In the cell at each intersection of a Business Task column and the appropriate Business Rule row, right-click and select the 'Create new relationship | UML:: Dependency' option.

When you have finished creating the relationships, close the Relationship Matrix.

Open the Rule Composer for the first Rule Task element in the Project Browser.

Relationship Matrix Compose Business Rules

Example

However you connect the Rule Task and Business Rule elements, if they are added to a diagram it might display as shown.

Notes

  • Business Rule Modeling is available in the Unified edition and the Ultimate edition of Enterprise Architect