Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Model Rules In an Operation

You can model business rules as Business Rule elements in the Business Rules Package, and attach them to the Rule Task elements in a RuleFlow Activity diagram.

Alternatively, in the Business Domain model, if you have operations in the rules processing Class that represent business action, you can define each of those operations as a Rule Task and attach the Business Rules to these operations on the Business Rules diagram or within the Rule Composer.

Access

Context Menu

Browser window| Double-click on Operation > General

Model Business Task on an operation

Step

Action

See also

1

In the 'Stereotype' field type 'RuleTask'.

2

Click on the Save button and on the Close button.

3

Drag the Operation from the Browser window onto the RuleFlow Activity diagram.

Also assign Business Rules to the operation, as for a Rule Task element.

Model Business Rules

Representation of Operation Rule Tasks

View

Detail

See also

Browser Window

The operations stereotyped as RuleTask display in the Browser window as shown:

Showing rule task operations in the Project Browser in Sparx Systems Enterprise Architect.

To pass the parameters for these operation calls, open the operation 'Properties' dialog and select the 'Call' page, then set the 'Behavior field to the operation to be called; under the 'Arguments' field, click on the Edit button and set up or edit the argument values to be passed.

On code generation, the code for rules logic is generated in the method body.

Behavior Calls Behavior Call Arguments

On the Rule Flow Diagram

When you drag and drop a RuleTask-stereotyped operation onto a Rule Flow diagram, an operation Call Behavior Action is created, as shown by the two darker elements.

An example rule flow diagram in Sparx Systems Enterprise Architect.

You must build the Call Behavior Actions into the activity flow, as for the normal Rule Task Actions.

Notes

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

Learn more